Summary: | [javadoc][1.5] Build of Eclipse project stop by NullPointerException and will not continue on Eclipse version later than 3.4M7 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | moonese <moonese> | ||||||||
Component: | Core | Assignee: | Frederic Fusier <frederic_fusier> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | critical | ||||||||||
Priority: | P3 | CC: | david_audel, eric_jodet, jerome_lanneluc, philippe_mulet | ||||||||
Version: | 3.4 | Flags: | jerome_lanneluc:
review+
philippe_mulet: review+ eric_jodet: review+ |
||||||||
Target Milestone: | 3.4 RC3 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows XP | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
moonese
2008-05-25 23:43:37 EDT
(In reply to comment #0) > Build ID: I20080523-0100 > > Steps To Reproduce: > just start to build the whole project by Project -> Clean > May you please provide us with the project / workspace / sample code with which you get the NPE? thanks Created attachment 101950 [details]
the java class that will get NPE when compile
To compile the attached java class will get NPE with stack here like:
---------------------------------------------------------------------
Description Resource Path Location Type
Internal compiler error
java.lang.NullPointerException
at org.eclipse.jdt.internal.compiler.ast.Javadoc.resolveTypeParameterTags(Javadoc.java:532)
at org.eclipse.jdt.internal.compiler.ast.Javadoc.resolve(Javadoc.java:315)
at org.eclipse.jdt.internal.compiler.ast.FieldDeclaration.resolve(FieldDeclaration.java:262)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1050)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1184)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:535)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:737)
at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:128)
at java.lang.Thread.run(Thread.java:619)
NPETest.java minisoft/src/org/eclipse/npetest line 0 Java Problem
Smells like a RC3 candidate. To reproduce, compiler compliance must be 1.5. If this is a recent regression, this should be fixed for RC3 I'll investigate (In reply to comment #4) > To reproduce, compiler compliance must be 1.5. If this is a recent regression, > this should be fixed for RC3 > NPE reproduced using 3.4M7 AND 3.3.2: this is not a recent regression. The (to be attached) NPE stack is different in 3.3.2 Created attachment 101958 [details]
NPE stack using 3.3.2
Created attachment 101963 [details]
Proposed patch
I can confirm this is not a regression and this potential NPE has existed since 3.1 when the 1.5 syntax was implemented for Javadoc comments!
However, the fix is more than simple: change to use the correct array in the resolveTypeParameterTags(Scope, boolean) method. This problem was surely due to an unfortunate copy/paste typo while creating this method...
patch looks good: +1 I just didn't realize that the problem was there for such a long time, and caused by mis-used javadoc tag. I just think if I get this compilation problem each time, someone else will definitely also find it, and report bug then being fixed. So I didn't report this at first. Otherwise I will do this more earlier... Anyway, the fix will be good, :) +1 for rc3 Patch looks good: +1 Released for 3.4RC3 in HEAD stream. verified on Eclipse build no: I20080528-2000 Verified for 3.4RC4 using build I20080530-0100 |