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.
Create the following enum. Right-click the get method and choose Find Usages. Click OK in the resulting dialog. The exception reported in http://statistics.netbeans.org/analytics/exception.do?id=199213 is thrown. The refactoring dialog says the Spring Beans module is the cause, but no idea where to file bugs against it. 100% reproducible. public enum Foo { BAR, BOO, BAZ { public void foo() { } }; }
The problem is in org.netbeans.modules.spring.beans.refactoring.SpringRefactorings class. It calls CompilationController.toPhase(ELEMENTS_RESOLVED) and tries to resolve TreePathHandle pointing to a method inside an anonymous inner class. However, to resolve such TreePathHandle correctly, you need fully attributed AST (including method bodies). CompilationController.toPhase(RESOLVED) is correct in such case.
*** Issue 164540 has been marked as a duplicate of this issue. ***
Fixed, according to dbalek recommendation: Details: http://hg.netbeans.org/main/rev/af2c4a60b9bf
Reproduced in Netbeans 6.8. See http://statistics.netbeans.org/analytics/exception.do?id=286302 If I recall correctly, I CTRL+LMB on a method name and got this exception.
Gili, are you able to reproduce it on your sources? Thanks.
dbalek, I don't understand what you mean. What should I be trying out?
You have reopened this bug because you were able to reproduce the AssertionError again in NB 6.8. My question is: do you have the steps to reproduce or was it just random?
Sorry, it was random. I was under the impression that the report I pointed to contains a log of my actions.
I cannot reproduce the issue in 6.8. If you can reproduce, please, describe the use case.
Just added the report #450427, it's happening in the latest dev build again. There is another very strange compiler related problem there, still trying to come up with a test case I can send you.
Adjusting the category.
*** This bug has been marked as a duplicate of bug 179621 ***