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 50131 - Repeated errors with a named local class
Summary: Repeated errors with a named local class
Status: RESOLVED DUPLICATE of bug 48869
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-07 21:43 UTC by Jesse Glick
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Some exceptions (177.72 KB, text/plain)
2004-10-07 21:45 UTC, Jesse Glick
Details
The class in question (13.67 KB, text/plain)
2004-10-07 21:48 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-10-07 21:43:22 UTC
041006 custom, JDK 1.5.0. Working on minicomposer
example module. Can't seem to work on
ScorePanel.java without getting errors over and
over - seem to be due to named local class:

class DeferredRun implements TaskListener, Runnable {
    public void taskFinished(Task t2) {
        SwingUtilities.invokeLater(this);
    }
    public void run() {
        init2();
    }
}
t.addTaskListener(new DeferredRun());

At least, when I did a Fix Imports, it got almost
everything right but then said it could not find
"DeferredRun". Also it failed to import
TaskListener. I manually added the TaskListener
import and now the class is compilable. However
just scrolling through it is enough to throw
errors right and left.
Comment 1 Jesse Glick 2004-10-07 21:45:31 UTC
Created attachment 18146 [details]
Some exceptions
Comment 2 Jesse Glick 2004-10-07 21:47:05 UTC
Afterwards I get an OOME and have to shut down the IDE (which I was
about to do anyway).
Comment 3 Jesse Glick 2004-10-07 21:48:33 UTC
Created attachment 18147 [details]
The class in question
Comment 4 Jesse Glick 2004-10-07 21:56:00 UTC
Restarting the IDE with a clear cache doesn't help; just starts
throwing errors again as soon as you start up again.

Once I rewrote the class to make DeferredRun a nested inner class
(i.e. not inside a method), then things seem to be OK again. So it
really looks like the parser just chokes on local classes somehow.
Comment 5 Martin Matula 2004-10-08 15:25:06 UTC
Yes, javacore has a problem with named local classes (as you found out
in issue 48869). We are working on it but the problem is a bit
complex. JMI part is done, but parser part still requires some work.
Hopefully we will be able to fix it soon after Tomas gets back to work
(he is sick).
Btw., you probably attached an incorrect log - this one contains NPEs
from BtreeStorage.save.

*** This issue has been marked as a duplicate of 48869 ***
Comment 6 Jesse Glick 2004-10-08 15:49:31 UTC
Maybe the local-class-related exceptions are further down in the log.
Hard to tell - I had so many pages full of exceptions, I did not know
which were triggered by what action.
Comment 7 Quality Engineering 2007-09-20 12:08:46 UTC
Reorganization of java component