thinkaurelius/titan — pull request #57 by BinaryRage (2012-08-17 10:35:37+00:00)
Title: AbstractTitanTx null ambiguity cleanup

I ran into NPEs when I fixed a bug in this class due to some null ambiguity issues. This pull requests removes the use of null where it's not part of a contracted method return:

* Use Guava Optional for newNodes
* Collection.get* == null has two possible meanings - the key doesn't exist or the key has a null value, use contains* instead (maybe consider null adverse collections which don't allow nulls in keys or values)
* Set a few fields to final and removed unneeded null dereferencing on close - clear() is called on those collections anyway