This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I am using the beans generated by schema2Beans as keys in Children.Keys. When I used BaseBeans I had no problem, but using javabeans I have got this exception after adding/removing some elements: java.lang.IllegalStateException: Error in com.streamsim.multigeomodelproject.xmlmultiview.ui.nodes.GeomodelNode$a with entry Children.Keys.KE[<intervalList> <interval name='interval_1' bottom='4' top='1'> <faciesDescrip,0] from among [Children.Keys.KE[<intervalList> <interval name='interval_1' bottom='4' top='1'> <faciesDescrip,0], Children.Array.AE[]] in {Children.Array.AE[]=Children.Info[Children.Array.AE[],length=0], Children.Keys.KE[<intervalList> <interval name='interval_1' bottom='4' top='1'> <faciesDescrip,0]=Children.Info[Children.Keys.KE[<intervalList> <interval name='interval_1' bottom='4' top='1'> <faciesDescrip,0],length=1]} probably caused by faulty key implementation. The key hashCode() and equals() methods must behave as for an IMMUTABLE object and the hashCode() must return the same value for equals() keys. at org.openide.nodes.Children.checkInfo(Children.java:889) at org.openide.nodes.Children.updateOrder(Children.java:985) at org.openide.nodes.Children.setEntries(Children.java:878) at org.openide.nodes.Children$Keys$2.run(Children.java:2136) at org.openide.util.Mutex.postRequest(Mutex.java:1162) at org.openide.util.Mutex.postWriteRequest(Mutex.java:512) at org.openide.nodes.Children$Keys.applyKeys(Children.java:2145) at org.openide.nodes.Children$Keys.setKeys(Children.java:2090) In order to fix this I had to wrap beans with other objects, but I do not think that is the best solution.
Doesn't affect the IDE itself, so adding the NO61 keyword.
I don't think this use case is supported, the objects generated by s2b are mutable and therefore the generated equals and hashcode don't behave as for an immutable object. You can always override the generated equals / hashCode for your beans using the user code section in the extra info file. Changing to enhancement for now.
yes, but it used to work when I generated baseBeans