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.
When i have a class "x" in some method, and another inner class (outside of the method) with the same name. Then any other class "Y" that extends "x" inside the same method as "x" will incorrectly use the other class (outside of the method). See link to forum. http://forums.netbeans.org/topic28295.html
Seems like a bug in JDK1.7 javac, which got pulled to NB. I tried to find out the cause, but did not succeed so far. Seems that the buggy changed occurred before the code was converted to mercurial. There is a quite simple workaround: go to Project Properties/Compile tab (for J2SE Project) and disable Compile on Save. After that the javac from your JDK will be used to compile the project and as long as that javac does not have this bug, the problem should go away.
(In reply to comment #1) > Seems like a bug in JDK1.7 javac, which got pulled to NB. I tried to find out > the cause, but did not succeed so far. Seems that the buggy changed occurred > before the code was converted to mercurial. > > There is a quite simple workaround: go to Project Properties/Compile tab (for > J2SE Project) and disable Compile on Save. After that the javac from your JDK > will be used to compile the project and as long as that javac does not have > this bug, the problem should go away. So, is this bug going to be fixed for JDK1.7? Have you had any luck finding the cause?
I took a deeper look. I am almost sure that this was caused by a fix for bug 5060485: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5060485 I will contact the javac maintainers to see what they think.
(In reply to comment #3) Sounds good, I have recently downloaded JDK1.7 (build 99) and the bug didn't occur. Perhaps Netbeans has an earlier build of JDK1.7?
I do not think this was fixed in JDK7 build 99 - but should be fixed by: http://hg.openjdk.java.net/jdk7/tl/langtools/rev/a75770c0d7f6 I suppose we will take a javac with this fix for 6.10.
The JDK7 support has been merged into NB trunk: http://hg.netbeans.org/jet-main/rev/c8b57ee089c0 It includes javac with the fix.