clojurewerkz / titanium

Clojure graph library built on top of Titan
106 stars 20 forks source link

fix NPE on (tg/open?) when no graph open or graph is shutdown #21

Closed ghost closed 11 years ago

ghost commented 11 years ago

calling tg/open? before tg/open ever:

=> (tg/open?)
IllegalArgumentException No matching field found: isOpen for class clojure.lang.Var$Unbound  clojure.lang.Reflector.getInstanceField (Reflector.java:271)

and after tg/shutdown :

=> (tg/open?)
NullPointerException   clojure.lang.Reflector.invokeNoArgInstanceMember (Reflector.java:296)
zmaril commented 11 years ago

This makes sense and gives context for this https://github.com/clojurewerkz/archimedes/commit/ec9202178bd655d87bd236a14b656d3265ebc002#commitcomment-3108860 Merging this. Making nil the default as well in Archimedes.