Bug 73678 - [1.5] NPE when saving an editor which contains genric type
Summary: [1.5] NPE when saving an editor which contains genric type
Status: VERIFIED 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 M2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-10 11:35 EDT by David Audel CLA
Modified: 2004-09-24 04:32 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.