Summary: | [compiler] NPE in ProblemReporter.invalidField plus .log swamping | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | P3 | ||
Version: | 3.2 | ||
Target Milestone: | 3.2 RC1 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
Dani Megert
2006-04-06 11:08:32 EDT
I will investigate. This might come from the fact that the class name is a number. This is supposed to be the class OpenTypeHistory. I don't understand why the name of the class is 56. I'll investigate why we try to resolve fields for such a class. I could imagine a bug in CVS update, or similar issue to cause the bogus scenario to occur. I think I can explain the '56': I opened the type and quickly wanted to go to line 56 but due the key binding bug in Platform UI the '56' was written into the editor and replaced the class name with '56'. Simpler test case: class 56 { private static class B { public static final String F = ""; } private static class C { } public void foo() { System.out.println(B.F); } } The recovery retrieves this cu: private static class B { public static final String F = ""; private B() { super(); } <clinit>() { } } private static class C { { } private C() { super(); } public void foo() { System.out.println(B.F); } } So foo is attached to C. The resolution of B.F fails because the binding for F is a problem binding that has no declaring class. And when we report the error, we expect the declaring class to be there. It seems that F has no declaring class because B is private. If you remove the private modifier in front of B, then you don't get the NPE. Problem comes from a problem field binding not carrying enough infor for error reporting. Added LookupTest#test063. Fixed *** Bug 127251 has been marked as a duplicate of this bug. *** Verified for 3.2 RC1 using Build id: I20060413-0010. The NPE is fixed. Dani, would you please open a separate bug for the log optimization suggestion? |