Bug 233887 - [javadoc][1.5] Build of Eclipse project stop by NullPointerException and will not continue on Eclipse version later than 3.4M7
Summary: [javadoc][1.5] Build of Eclipse project stop by NullPointerException and will...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 3.4 RC3   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-25 23:43 EDT by moonese CLA
Modified: 2008-05-30 10:40 EDT (History)
4 users (show)

See Also:
jerome_lanneluc: review+
philippe_mulet: review+
eric_jodet: review+


Attachments
the java class that will get NPE when compile (188 bytes, text/x-java)
2008-05-26 06:29 EDT, moonese CLA
no flags Details
NPE stack using 3.3.2 (7.24 KB, text/plain)
2008-05-26 06:58 EDT, Eric Jodet CLA
no flags Details
Proposed patch (2.92 KB, patch)
2008-05-26 07:23 EDT, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description moonese CLA 2008-05-25 23:43:37 EDT
Build ID: I20080523-0100

Steps To Reproduce:
just start to build the whole project by Project -> Clean


More information:
The build will stop at an exception, showing an error icon at line 0 which is package declaration, and with one and only item in Problem ivew, with error message as below.
----------------------------------------------------------
error stack in Problems view (3.4RC2):

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:743)
	at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
	at java.lang.Thread.run(Thread.java:619)
	SetLCTPasswordHelper.java	...	line 0	Java Problem


-----------------------------------------------


Actually I just got this error with each of the builds after 3.4M7, and I hope it could be resolved by next Eclipse release during the past days, but still get the same error on the latest 3.4RC2 :(

in 3.4M7, it will also report the same error, but will not block the entire project build, with error stack as below:

----------------------------------------------------------
error stack in Problems view (3.4M7):

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)
Comment 1 Eric Jodet CLA 2008-05-26 02:35:36 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
Comment 2 moonese CLA 2008-05-26 06:29:52 EDT
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
Comment 3 Philipe Mulet CLA 2008-05-26 06:35:06 EDT
Smells like a RC3 candidate.
Comment 4 Jerome Lanneluc CLA 2008-05-26 06:41:50 EDT
To reproduce, compiler compliance must be 1.5. If this is a recent regression, this should be fixed for RC3
Comment 5 Frederic Fusier CLA 2008-05-26 06:46:43 EDT
I'll investigate
Comment 6 Eric Jodet CLA 2008-05-26 06:55:02 EDT
(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
Comment 7 Eric Jodet CLA 2008-05-26 06:58:56 EDT
Created attachment 101958 [details]
NPE stack using 3.3.2
Comment 8 Frederic Fusier CLA 2008-05-26 07:23:44 EDT
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...
Comment 9 Eric Jodet CLA 2008-05-26 07:38:46 EDT
patch looks good: +1
Comment 10 moonese CLA 2008-05-26 07:55:09 EDT
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, :)

Comment 11 Philipe Mulet CLA 2008-05-27 06:19:52 EDT
+1 for rc3
Comment 12 Jerome Lanneluc CLA 2008-05-27 07:14:24 EDT
Patch looks good: +1
Comment 13 Frederic Fusier CLA 2008-05-27 09:30:07 EDT
Released for 3.4RC3 in HEAD stream.
Comment 14 moonese CLA 2008-05-29 05:23:05 EDT
verified on Eclipse build no: I20080528-2000
Comment 15 David Audel CLA 2008-05-30 10:40:20 EDT
Verified for 3.4RC4 using build I20080530-0100