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.
A DebugException is thrown when attempting to obtain the collection of references to a type parameter in an interface implemented by a class. Example: find all references to "MyFeedback" in class "MyGenerator": public class MyGenerator implements Generator<MyFeedback, Object, MyOutput> { public Task<MyFeedback, Object> generate() { return null; } public void consume(MyFeedback obj) { } } org.netbeans.mdr.util.DebugException: Invalid key at org.netbeans.mdr.storagemodel.MdrStorage.getObjectsFromIndex(MdrStorage.java:725) at org.netbeans.mdr.storagemodel.IndexImmutSet.getObjects(IndexImmutSet.java:66) at org.netbeans.mdr.storagemodel.AssocEndIndexSet.iterator(AssocEndIndexSet.java:96) at org.netbeans.mdr.handlers.AEIndexSetWrapper.iterator(AEIndexSetWrapper.java:186) at foo.refactortest.TestAction.performAction(TestAction.java:96) at org.openide.util.actions.CallableSystemAction$1.run(CallableSystemAction.java:94) at org.netbeans.modules.openide.util.ActionsBridge.doPerformAction(ActionsBridge.java:47) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:90) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:234) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:231) at java.awt.Component.processMouseEvent(Component.java:5488) at javax.swing.JComponent.processMouseEvent(JComponent.java:3126) at org.openide.awt.ToolbarButton.processMouseEvent(ToolbarButton.java:33) at java.awt.Component.processEvent(Component.java:5253) at java.awt.Container.processEvent(Container.java:1966) at java.awt.Component.dispatchEventImpl(Component.java:3955) at java.awt.Container.dispatchEventImpl(Container.java:2024) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822) at java.awt.Container.dispatchEventImpl(Container.java:2010) at java.awt.Window.dispatchEventImpl(Window.java:1774) at java.awt.Component.dispatchEvent(Component.java:3803) at java.awt.EventQueue.dispatchEvent(EventQueue.java:463) 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)
Created attachment 29882 [details] Failing test project and target project on which it (fails to) operate
For the attached example: - unzip the two projects. - edit RefactorTest2/src/foo/refactortest/TestAction to change the String csProjectDir to the directory in which the RefactorTestTarget project was unzipped. - build and load the RefectorTest2 module. - Choose "Refactoring Test" from the Tools menu (or click the Valve icon).
Changed to java component, as the problem appears to be in javamodel rather than MDR. In this example, public class MyGenerator implements Generator<MyFeedback, Object, Object> { ... public void consume(MyFeedback obj) { } } the call to getReferences() on the ParameterizedType "MyFeedback" should return a collection of one item (the use of that parameter in the consume method). Instead, it returns an empty collection (which leads to the misleading DebugException).
Jirko, is it reproducible? Thanks
NB 5.0 -fcs JDK 1.5.0_05 Linux Fedora Core 2 Reproducible.
Dane, can you take a look at it? Thanks
trunk: /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ParameterizedTypeImpl.java new revision: 1.30; previous revision: 1.29 release55: /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/ParameterizedTypeImpl.java new revision: 1.24.2.2.2.1; previous revision: 1.24.2.2
Reorganization of java component