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 88413 - [retouche]IOE while editing file with references to undeclared variable
Summary: [retouche]IOE while editing file with references to undeclared variable
Status: RESOLVED DUPLICATE of bug 88323
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-01 14:21 UTC by _ tboudreau
Modified: 2007-09-26 09:14 UTC (History)
0 users

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 _ tboudreau 2006-11-01 14:21:52 UTC
In same file as issue 88412, I am editing a method:
    public void getControlPoints (int[] xp, int[] yp) {
        xp[0] = this.x1;
        xp[1] = this.y1;
        xp[0] = this.x;
        xp[1] = y + h;
    }
At the line xp[0] = this.x I had just accepted code completion of x1.  I got
this.x and the following exception was thrown (my guess is these problems have
some connection to the fact that there are references to an undeclared variable
'x' in the file).

java.io.IOException
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:377)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.query(JavaCompletionProvider.java:215)
	at
org.netbeans.spi.editor.completion.support.AsyncCompletionTask.run(AsyncCompletionTask.java:195)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:541)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:963)
Caused by: java.lang.NullPointerException
	at com.sun.tools.javac.comp.Enter.getClassEnv(Enter.java:136)
	at com.sun.tools.javac.api.JavacTrees.getAttrContext(JavacTrees.java:250)
	at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:184)
	at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:63)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.getCompletionEnvironment(JavaCompletionProvider.java:3216)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.resolveCompletion(JavaCompletionProvider.java:414)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.run(JavaCompletionProvider.java:281)
	at
org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.run(JavaCompletionProvider.java:81)
	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:375)
	... 4 more
Comment 1 Dusan Balek 2006-11-01 17:10:09 UTC
The same root case as issue 88323.

*** This issue has been marked as a duplicate of 88323 ***