From: SourceForge.net <no...@so...> - 2007-07-08 16:40:20
|
Bugs item #1749949, was opened at 2007-07-08 18:40 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1749949&group_id=27895 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: In-Memory Impl Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Kordzik (kordzik) Assigned to: Nobody/Anonymous (nobody) Summary: Topic.createTopicName(...) throws NullPointerException Initial Comment: This refers to release 0.9.8, in-memory implementation (although I doubt it has influence on the bug). I use TMAPI interface. If it is attempted to create a TopicName with exactly the same value as previously removed TopicName (using Topic.createTopicName(String, Collection)), a RuntimeException is thrown, which is initiated by a NullPointerException. As far as I could infer, it has something to do with internal events that notify listeners (indexes probably?) that new name was created. The relevant part of the exception stack: Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException at org.tm4j.tmapi.core.TMAPITopicImpl.createTopicName(TMAPITopicImpl.java:78) Example code to replicate the bug: //assumed TopicMap tm is instantianated beforehand //creating new user topic Topic type = tm.createTopic(); Topic t = tm.createTopic(); // creating scope collection Vector<Topic> scope = new Vector<Topic>(); scope.add(type); // creating name t.createTopicName("name", scope); //removing topic t.remove(); //creating new one t = tm.createTopic(); //RuntimeException occurs at the following line t.createTopicName("name", scope); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=391879&aid=1749949&group_id=27895 |