Bug 70767 - [1.5] NPE compiling code with explicit constructor invocation
Summary: [1.5] NPE compiling code with explicit constructor invocation
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-23 18:34 EDT by Olivier Thomann CLA
Modified: 2005-01-11 11: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 Olivier Thomann CLA 2004-07-23 18:34:53 EDT
Using latest code out of HEAD, I got this exception:
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.isRecursive(ConstructorDeclaration.java:355)
	at
org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.analyseCode(ConstructorDeclaration.java:50)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:692)
	at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:262)
	at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:80)
	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:511)
	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:335)
	at org.eclipse.jdt.internal.compiler.batch.Main.performCompilation(Main.java:1664)
	at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:372)
	at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:265)
	at org.eclipse.jdt.internal.compiler.batch.Main.compile(Main.java:257)
	at org.eclipse.jdt.core.tools.compiler.Compile.main(Compile.java:19)

compiling this code:

public class X<E> {
	
	<E> X(E e) {
		<E> this();
	}
	
	<E> X() {
	}
}
Comment 1 Philipe Mulet CLA 2004-07-26 05:32:38 EDT
Need to use original binding to find corresponding declaration.
Added regression test: GenericTypeTest#test259.
Comment 2 Philipe Mulet CLA 2004-07-26 05:32:49 EDT
Fixed