You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[java] 1) testName(org.tmapi.core.TestScoped)
java.lang.NullPointerException
[java] at net.ontopia.topicmaps.impl.tmapi2.NameImpl.removeTheme
(NameImpl.java:246)
[java] at org.tmapi.core.TestScoped._testScoped(TestScoped.java:
49)
[java] at org.tmapi.core.TestScoped.testName(TestScoped.java:84)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
[java] at net.ontopia.test.TestRunner.run(TestRunner.java:125)
[java] at net.ontopia.test.TestRunner.main(TestRunner.java:60)
[java] 2) testUsedAsNameTheme
(org.tmapi.core.TestTopicRemovableConstraint)
java.lang.NullPointerException
[java] at net.ontopia.topicmaps.impl.tmapi2.NameImpl.removeTheme
(NameImpl.java:246)
[java] at org.tmapi.core.TestTopicRemovableConstraint._testScoped
(TestTopicRemovableConstraint.java:75)
[java] at
org.tmapi.core.TestTopicRemovableConstraint.testUsedAsNameTheme
(TestTopicRemovableConstraint.java:179)
Original issue reported on code.google.com by lars.he...@gmail.com on 20 Jul 2009 at 12:55
The text was updated successfully, but these errors were encountered:
This is caused since the wrappedVariants is initialized with null.
This should fix it:
public void removeTheme(Topic theme) {
super.removeTheme(theme);
for (Variant v : getVariants()) {
if (((VariantImpl) v).getExplicitScope().contains(theme))
v.addTheme(theme);
}
}
I'd do it but I don't understand what the code does. If a theme is removed from
a
name, that theme is added to the variant iff it is in getExplicitScope()?!?
Why doesn't the variant return the union of the explicit scope and the 'other'
scope?!?
Commenting the code would help. :)
Original comment by lars.he...@gmail.com on 20 Jul 2009 at 1:04
Original issue reported on code.google.com by
lars.he...@gmail.com
on 20 Jul 2009 at 12:55The text was updated successfully, but these errors were encountered: