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 10864 - IllegalArgumentException at JavaParserGlue.java:252
Summary: IllegalArgumentException at JavaParserGlue.java:252
Status: CLOSED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-03-30 14:33 UTC by _ pkuzel
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pkuzel 2001-03-30 14:33:21 UTC
[30/3/2001]

While pressing Alt-G in editor at a field usage I got:

Fri Mar 30 16:27:49 GMT+02:00 2001: java.lang.IllegalArgumentException:
Incompatible implementation:
org.netbeans.modules.java.parser.SourceImplProxy@cd619
java.lang.IllegalArgumentException: Incompatible implementation:
org.netbeans.modules.java.parser.SourceImplProxy@cd619
        at
org.netbeans.modules.java.JavaParserGlue.getBinding(JavaParserGlue.java:252)
        at
org.netbeans.modules.java.JavaParserGlue.sourceToText(JavaParserGlue.java:528)
        at
org.netbeans.modules.java.JavaParserGlue.findElement(JavaParserGlue.java:497)
        at
org.netbeans.modules.editor.java.NbJavaSyntaxSupport.getMethodStartPosition(NbJavaSyntaxSupport.java:100)
        at
org.netbeans.editor.ext.ExtSyntaxSupport.findLocalDeclarationPosition(ExtSyntaxSupport.java:379)
        at
org.netbeans.editor.ext.ExtSyntaxSupport.findDeclarationPosition(ExtSyntaxSupport.java:371)
        at
org.netbeans.editor.ext.ExtKit$GotoDeclarationAction.gotoDeclaration(ExtKit.java:413)
        at
org.netbeans.modules.editor.java.JavaKit$JavaGotoDeclarationAction.actionPerformed(JavaKit.java:294)
        at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:133)
        at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1702)
        at javax.swing.JComponent.processKeyBinding(JComponent.java:2156)
        at javax.swing.JComponent.processKeyBindings(JComponent.java:2182)
        at javax.swing.JComponent.processKeyEvent(JComponent.java:2119)
        at javax.swing.JEditorPane.processKeyEvent(JEditorPane.java:1159)
        at java.awt.Component.processEvent(Component.java:3555)
        at java.awt.Container.processEvent(Container.java:1164)
        at java.awt.Component.dispatchEventImpl(Component.java:2595)
        at java.awt.Container.dispatchEventImpl(Container.java:1213)
        at java.awt.Component.dispatchEvent(Component.java:2499)
        at java.awt.LightweightDispatcher.processKeyEvent(Container.java:2155)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2135)
        at java.awt.Container.dispatchEventImpl(Container.java:1200)
        at java.awt.Window.dispatchEventImpl(Window.java:912)
        at java.awt.Component.dispatchEvent(Component.java:2499)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:333)
        at
java.awt.EventDispatchThread.pumpOneEvent(EventDispatchThread.java:103)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Comment 1 Svata Dedic 2001-03-30 16:09:17 UTC
I would say, it is an editor bug - it is passing memory-represented Elements to
the SourceCookie.Editor. Only elements produced by that DataObject itself are
valid input parameters, sorry. Clones are invalid as well, since they are
detached from the source file.
Comment 2 Miloslav Metelka 2001-03-31 00:08:49 UTC
That's strange. We use the following code and from the Svata's description I
don't know what's wrong with it:

SourceCookie.Editor sce =
(SourceCookie.Editor)dob.getCookie(SourceCookie.Editor.class);
if (sce != null) {
  Element elem = sce.ifindElement(pos);
  if (elem != null) {
    javax.swing.text.Element swingElem = sce.sourceToText(elem);
    if (swingElem != null) {
      return swingElem.getStartOffset();
    }
  }
}
Comment 3 Svata Dedic 2001-03-31 07:27:27 UTC
I'm dumb, sorry. I've overlooked the exact class of the implementation shown 
reacting only to the exception itself (which is thrown when the implementation 
cookie is not found on the Element). I have to adjust the parsing proxy, since 
it is not transparent in this case.
Comment 4 Svata Dedic 2001-04-02 16:00:16 UTC
Petr, could you please provide me with more details how to reprocude this bug 
? I was not able to determine the bug source from static code analysis :-(
Comment 5 _ pkuzel 2001-04-02 16:09:29 UTC
The latest build is OK. If nobody reopens it...
Comment 6 Quality Engineering 2003-07-01 13:11:59 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.
Comment 7 Quality Engineering 2003-07-01 13:16:04 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.