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.

Bug 84219 - Exception on pasting in Schema view
Summary: Exception on pasting in Schema view
Status: VERIFIED FIXED
Alias: None
Product: xml
Classification: Unclassified
Component: Schema Tools (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P1 blocker (vote)
Assignee: Nathan Fiedler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-05 14:29 UTC by kozlov
Modified: 2006-09-18 12:00 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception (937.60 KB, application/octet-stream)
2006-09-14 15:18 UTC, kozlov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kozlov 2006-09-05 14:29:38 UTC
Reproduced in build 060904.

To reproduce the bug:

- create 'newSchema';
- open 'OTA_TravelItinerary' schema;
- select all Complex Types in 'OTA_TravelItinerary' schema and copy them;
- switch to 'newSchema' and invoke 'Paste' on Complex Types node.

Exception:

java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
	at java.util.ArrayList.RangeCheck(ArrayList.java:547)
	at java.util.ArrayList.get(ArrayList.java:322)
	at
org.netbeans.modules.xml.xam.ui.column.BasicColumnView.removeColumnsAfter(BasicColumnView.java:144)
	at
org.netbeans.modules.xml.schema.ui.basic.SchemaColumnsView.removeColumnsAfter(SchemaColumnsView.java:349)
	at
org.netbeans.modules.xml.schema.ui.basic.SchemaColumn.addDetailColumn(SchemaColumn.java:255)
	at
org.netbeans.modules.xml.schema.ui.basic.SchemaColumn.propertyChange(SchemaColumn.java:212)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
	at org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:776)
	at org.openide.util.Mutex.doEvent(Mutex.java:1158)
	at org.openide.util.Mutex.readAccess(Mutex.java:284)
	at org.openide.explorer.ExplorerManager.fireInAWT(ExplorerManager.java:773)
	at org.openide.explorer.ExplorerManager.access$600(ExplorerManager.java:58)
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.updateSelection(ExplorerManager.java:248)
	at
org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:253)
	at org.openide.util.Mutex.readAccess(Mutex.java:293)
	at org.openide.explorer.ExplorerManager.setSelectedNodes(ExplorerManager.java:259)
	at org.openide.explorer.view.ListView.selectionChanged(ListView.java:406)
	at org.openide.explorer.view.ListView$Listener.valueChanged(ListView.java:1198)
	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
	at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)
	at
javax.swing.DefaultListSelectionModel.removeIndexInterval(DefaultListSelectionModel.java:611)
	at
javax.swing.plaf.basic.BasicListUI$Handler.intervalRemoved(BasicListUI.java:2576)
	at javax.swing.AbstractListModel.fireIntervalRemoved(AbstractListModel.java:161)
	at org.openide.explorer.view.NodeListModel.removed(NodeListModel.java:346)
	at org.openide.explorer.view.NodeListModel$Listener.removed(NodeListModel.java:421)
	at
org.openide.explorer.view.VisualizerChildren.removed(VisualizerChildren.java:143)
	at org.openide.explorer.view.VisualizerEvent$Removed.run(VisualizerEvent.java:123)
	at org.openide.util.Mutex.readAccess(Mutex.java:293)
[catch] at org.openide.explorer.view.VisualizerNode$QP.run(VisualizerNode.java:645)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:598)
	at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Comment 1 Nathan Fiedler 2006-09-06 02:02:37 UTC
I do not get an exception when following the steps given. The copy/paste appears
to work fine.
Comment 2 kozlov 2006-09-06 11:34:59 UTC
It is necessary to cut components instead of to copy.
Comment 3 Nathan Fiedler 2006-09-07 02:12:36 UTC
Fixed in release55 branch.

xamui/src/org/netbeans/modules/xml/xam/ui/column/BasicColumnView.java;
new revision: 1.1.2.6; previous revision: 1.1.2.5
Comment 4 kozlov 2006-09-11 17:34:22 UTC
Still reproduced in build060909.
Comment 5 Nathan Fiedler 2006-09-11 19:24:48 UTC
It is not possible for the exact same exception (specifically that line of code
in BasicColumnView) to occur again -- I rewrote the entire method such that it
will not throw this exception. Either you are seeing a different exception, or
the build is somehow out of date. Marking as fixed.

If you see the problem again, please get the stack trace and examine it to see
if it is the same exception, and has the same first 5 lines (specifically the
source file names and line numbers). If not, please file a new bug report.
Comment 6 Nathan Fiedler 2006-09-11 19:28:25 UTC
I forgot to mention, I tried reproducing this on both Solaris 10 and Windows XP,
using both JDK 1.5 and 1.6 beta 2 -- no exception occurred (except the one I
entered against NB, which should have been fixed by now).
Comment 7 kozlov 2006-09-14 15:18:53 UTC
Created attachment 33951 [details]
exception
Comment 8 kozlov 2006-09-15 11:54:28 UTC
-
Comment 9 Nathan Fiedler 2006-09-15 19:15:29 UTC
Thank you for the screencast. I can see that you missed a step in the reproduce
steps -- tile the two editors so they are side-by-side. However, that seems to
make no difference. I do exactly what the screencast shows and it works
perfectly, no exceptions. I have used both Solaris 10 x86 and Windows XP, both
JDK 1.5.0_07 and JDK 1.6 beta 2.

If you are still seeing an exception, please open a new bug. As I have stated
before, it is literally impossible for you to get the exact same exception
again. When you create a new bug, please provide the JDK version and IDE build
that you are using. Also, you must provide a new stack trace -- attach it to the
issue, rather than copying/pasting into a comment.

Marking as fixed again; as I have stated before, the original exception is
fixed. Whatever you are seeing now is a *new* exception.
Comment 10 kozlov 2006-09-18 12:00:15 UTC
Verified in build060912.