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.
Summary: | NullPointerException: #120577: Cannot resolve ElementHandle[kind=CLASS; sigs=org.glassfish.jersey.server.Application$2 ]; file: /home/m_potociar/sandbox/java.net/jersey/core-server/src/main/java/org/g | ||
---|---|---|---|
Product: | java | Reporter: | m_potociar <m_potociar> |
Component: | Compiler | Assignee: | Dusan Balek <dbalek> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | akrasny, fillumina, js-java, netacq_server |
Priority: | P3 | ||
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | 185201 |
Attachments: |
stacktrace
stacktrace Reproducible testcase |
Description
m_potociar
2012-02-19 13:25:25 UTC
Created attachment 115917 [details]
stacktrace
*** Bug 209932 has been marked as a duplicate of this bug. *** WARNING [org.netbeans.modules.j2ee.metadata.model.api.support.annotation.PersistentObjectManager]: typesChanged: type ElementHandle[kind=CLASS; sigs=org.glassfish.jersey.server.Application$3 ] has dissapeared element handle cannot be resolved. See http://statistics.netbeans.org/exceptions/messageslog?id=561205 This bug already has 5 duplicates see http://statistics.netbeans.org/exceptions/detail.do?id=185201 Created attachment 121008 [details]
stacktrace
Created attachment 137867 [details] Reproducible testcase The problem appears to be that a client gets an ElementHandle from the index, which refers to an anonymous (or local) class, and this handle cannot be resolved. This appear to be caused by the Repair, which strips method bodies when the class' header is broken, which prevents the anonymous (and local) classes from being generated. But the index already contains references to them and returns them when someone asks. To reproduce with the attach project: 1. unpack, open in the IDE, open both pkg208611.Broken and pkg208611.I in the editor 2. go to I and observe there is no implemented-by badge, and the log shows: INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=CLASS; sigs=pkg208611.Broken$1 ] 3. go to Broken, and fix its superclass, go back to I: now the implemented-by badge appears and leads to Broken. But I think it should be present even in step 2. Note: http://hg.netbeans.org/jet-main/rev/c8a4bea8da78 Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1. |