Bug 48064 - Javadoc: NPE during build process
Summary: Javadoc: NPE during build process
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 3.0 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-04 09:55 EST by Douglas Pollock CLA
Modified: 2003-12-16 07:02 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock CLA 2003-12-04 09:55:54 EST
The build fails when doing a "Rebuild All", which prevents me from getting a
functional workspace.  The error meessage is:

Build problems
  Errors during build.
    java.lang.NullPointerException encountered while running
org.eclipse.jdt.internal.core.builder.JavaBuilder.

The machine is a Gentoo Linux box running Sun's JDK 1.4.2_02, kernel
2.6.0-test11, GNOME desktop environment, and the Enlightenment window manager.

The stack trace is as follows:
!ENTRY org.eclipse.core.resources 4 2 Dec 04, 2003 09:51:55.188
!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.resources".
!STACK 0
java.lang.NullPointerException
        at
org.eclipse.jdt.internal.compiler.lookup.MethodBinding.areParametersEqual(MethodBinding.java:63)
        at org.eclipse.jdt.internal.compiler.ast.Javadoc.resolve(Javadoc.java:141)
        at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveJavadoc(AbstractMethodDeclaration.java:366)
        at
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.resolveJavadoc(ConstructorDeclaration.java:397)
        at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:356)
        at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:926)
        at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:975)
        at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:271)
        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:515)
       at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:328)
       at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:205)
        at
org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:155)
        at
org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:51)
        at
org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:212)
        at
org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:135)
        at
org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:493)
        at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:824)
        at org.eclipse.core.runtime.Platform.run(Platform.java:479)
        at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:138)
        at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:209)
        at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:164)
        at
org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:190)
        at
org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:824)
        at org.eclipse.core.runtime.Platform.run(Platform.java:479)
        at
org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:193)
        at
org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:227)
        at
org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:255)
        at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:165)
        at
org.eclipse.ui.actions.GlobalBuildAction$1.run(GlobalBuildAction.java:184)
        at
org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:101)
Comment 1 Olivier Thomann CLA 2003-12-04 10:04:33 EST
Could you please provide your test case?
Comment 2 Frederic Fusier CLA 2003-12-04 10:11:59 EST
Do you have the same error if the option 'Problems in Javadoc tags' is set 
to 'Ignore'?
Comment 3 Douglas Pollock CLA 2003-12-04 10:21:50 EST
Thank you for your help.  Setting "Preferences > Java > Compiler > Problems in
Javadoc tags" to "Ignore" makes the problem go away.  Previously, I had it set
to "Warning".

Downgrading to major, since a workaround exists, but the functionality is
somewhat important (?).
Comment 4 Frederic Fusier CLA 2003-12-04 10:31:12 EST
It would be really helpful for me to have a test case. Or, would it be possible 
for you to apply a patch on source file(s) if I cannot reproduce the problem?
Comment 5 Frederic Fusier CLA 2003-12-04 11:54:31 EST
I can reproduce the problem:
file X.java:
public class X {
	X(String str) {}
}
file Y.java
public class Y extends X {
	/**
	 * @see X#X(STRING)
	 */
	Y(String str) {super(str);}
}
When you save file Y.java, then you get the NPE...

If you remove the @see reference or fix the invalid type in argument:
public class Y extends X {
	/**
	 * @see X#X(String)
	 */
	Y(String str) {super(str);}
}
then the NPE also disappear...

This can be another workaround if you can easily identify where the invalid 
reference is...

Otherwise, the fix is ready and after performing all tests, it will be released 
surely for integration build next week
Comment 6 Frederic Fusier CLA 2003-12-04 13:29:06 EST
Fixed.

Binding control was invalid before starting looking at @see reference in 
overriden methods (see bug 47339).

Test cases added in jdt.core.tests.compiler.regression.JavadocTestMixed
Comment 7 David Audel CLA 2003-12-16 07:02:58 EST
Verified for 3.0M6