If a topic map holds only topic names without the default name type,
TopicNameComparator.compare will throw a NullPointerException. This behavior
was introduced by revision r2240. Note that the TopicNameComparator.compare
method is invoked numerous times, e.g. by TopicStringifier.toString.
The attached testcase creates an InMemoryTopicMapStore and adds a topic with
two typed topic names. If we compare these two names a NullPointerException is
thrown. The solution is to check wether the 'untypedname' variable holds a null
Original issue reported on code.google.com by p.kruijsen on 9 Mar 2012 at 12:22