Summary: | [compiler] NPE in Javadoc.resolve(Javadoc.java:196) + log swamped | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Dani Megert <daniel_megert> | ||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P3 | CC: | markus.kell.r, maxime_daniel | ||||
Version: | 3.2 | ||||||
Target Milestone: | 3.2 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Dani Megert
2006-03-22 04:54:09 EST
Type declaration name has been modified ('fil' instead 'JavaSearchActionGroup') => all constructors are converted into methods with a null return type. Javadoc resolution was not protected against this because it should not be called in this case (method binding was expected to be null)... Here's a smaller test case to reproduce the problem: Test.java: public class X { /** */ public Test() {} /** */ public test() {} } Tracking resolution shows that SourceTypeBinding.methods() misses to reset binding for invalid method Test() but do it correctly for test() method... Changing line 1088 (in SourceTypeBinding v_647): continue nextMethod; // methods with same selector are contiguous with: break nextSibling; // methods with same selector are contiguous fixes the problem... Philippe, do you agree with this fix? Actually, the binding should still be nulled out in this case, likely a regression introduced recently when sorting bindings. Created attachment 36749 [details]
Test case
Apply this patch on org.eclipse.jdt.core.test.compiler project.
It adds a test on JavadocBugTests to verify that NPE does no longer occur.
I think Frederic's fix is the right one. Will release it. Frederic pls add a testcase. Patch applied in HEAD. All JDT/Core and JDT/UI tests pass. *** Bug 132815 has been marked as a duplicate of this bug. *** Added LookupTest#test059 *** Bug 132665 has been marked as a duplicate of this bug. *** *** Bug 132846 has been marked as a duplicate of this bug. *** *** Bug 132877 has been marked as a duplicate of this bug. *** Added SnippetCompletionTests_1_5#testCodeSnippetAssistForBug132665 see bug 132665 commment 3 Verified using I20060328-0010 for 3.2M6 |