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.
Build: NB 5.5 Dev 200606150200 Steps to reproduce it: 1. Create a SynchronousSample project. 2. Expand SynchronousSample > Source Packages > <default package> node 3. Right-click SynchronousSample.bpel file, select Delete from the context menu. 4. Will get ClassCastException: java.lang.ClassCastException: java.lang.Integer at org.openide.util.lookup.ArrayStorage$Transaction.<init>(ArrayStorage.java:344) at org.openide.util.lookup.ArrayStorage.beginTransaction(ArrayStorage.java:237) at org.openide.util.lookup.DelegatingStorage.beginTransaction(DelegatingStorage.java:89) at org.openide.util.lookup.AbstractLookup.removePair(AbstractLookup.java:210) at org.openide.util.lookup.AbstractLookup$Content.removePair(AbstractLookup.java:1098) at org.openide.util.lookup.InstanceContent.remove(InstanceContent.java:66) at org.netbeans.modules.bpel.core.BPELDataObject.setModified(BPELDataObject.java:93) at org.openide.text.DataEditorSupport$Env.unmarkModified(DataEditorSupport.java:550) at org.openide.windows.CloneableOpenSupport$Listener.run(CloneableOpenSupport.java:315) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) [catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
assigning to Denis as BPELDataObject is in stack. Feel free to reassign if not your problem.
There are two issues actually in this bug. One - ClassCastException. It appears when user open editor but don't change BPEL file. It seems this is origiannly bug inside NB InstanceContent implementation . I don't want to start discussion about this problem with NB gyus, so I just put into InstanceContent fake objec. The problem with InstanceContent it seems appear when one tries to delete smth. but InstanceContent is empty. When InstanceContent has some object inside it then all is ok. And there is no methods in InstanceContent that can be used for query its non-emptiness. The second - NPE. It appears when user dosn't open at all editor for BPEL. In this case InstanceContent was not initialized via lookup bootstrapping. And trying to remove smth from null instance of InstanceContent cause NPE. One need to check initialized InstanceContent before add/remove smth to/from it. Both issues are fixed.
Verified the bug is fixed in nightly 060725