Bug 73678

Summary: [1.5] NPE when saving an editor which contains genric type
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description David Audel CLA 2004-09-10 11:35:02 EDT
build I20040907

1) create the following class
package test;
// Invalid Consecutive Parameterized Type Declaration
public class X1<A1 extends X2<A2> {
	A1 a1;\n +
}
// Invalid Parameterized Type Declaration
class X2<A2 {
	A2 a2;\n +
}
2) try to save the editor

an NPE occcurs

java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.compiler.ast.ParameterizedSingleTypeReference.checkBou
nds(Unknown Source)
	at 
org.eclipse.jdt.internal.compiler.lookup.ClassScope.checkTypeVariableBounds
(Unknown Source)
	at 
org.eclipse.jdt.internal.compiler.lookup.ClassScope.connectTypeHierarchy
(Unknown Source)
	at 
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.connectTypeHierar
chy(Unknown Source)
	at 
org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.completeTypeBindings
(Unknown Source)
	at org.eclipse.jdt.internal.compiler.Compiler.resolve(Unknown Source)
	at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process
(Unknown Source)
	at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure
(Unknown Source)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Unknown Source)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(Unknown 
Source)
	at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent
(Unknown Source)
	at 
org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation
(Unknown Source)
	at org.eclipse.jdt.internal.core.JavaModelOperation.run(Unknown Source)
	at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation
(Unknown Source)
	at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(Unknown 
Source)
	at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(Unknown 
Source)
	at 
org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitDocumentProvider.commitWo
rkingCopy(Unknown Source)
Comment 1 Kent Johnson CLA 2004-09-10 16:51:29 EDT
I get syntax errors with the latest.
Comment 2 David Audel CLA 2004-09-13 04:46:57 EDT
Compliance level must be 1.4 to reproduce the problem.
Comment 3 Kent Johnson CLA 2004-09-14 14:29:14 EDT
Needed to check the resolvedType for null
Comment 4 Frederic Fusier CLA 2004-09-24 04:32:15 EDT
Verified for 3.1 M2 with build I200409231635.