Bug 83096

Summary: [1.5][compiler] NPE for class with duplicate type parameter
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: akiezun
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-01-18 09:51:36 EST
I20050112-1200 + jdt.core v_532

NPE when creating AST for class with duplicate type parameter:
    public class Try<A, A> { }

The duplicate type parameters are correctly reported, but in addition, the
following error occurs:

Error Jan 18, 2005 15:46:49.870 An internal error occurred during: "Java AST
creation".
java.lang.NullPointerException
	at
org.eclipse.jdt.internal.compiler.lookup.MethodVerifier15.verify(MethodVerifier15.java:296)
	at
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.verifyMethods(SourceTypeBinding.java:1326)
	at
org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.verifyMethods(CompilationUnitScope.java:698)
	at
org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:756)
	at
org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:475)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:763)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:575)
	at
org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:563)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:494)
	at
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:165)
	at
org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:142)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Comment 1 Kent Johnson CLA 2005-01-18 16:18:58 EST
Added GenericType test466

No longer removing duplicate type variables. We will keep them around to 
reduce secondary errors since the assumption is that the duplicate will be 
renamed & not deleted.
Comment 2 Olivier Thomann CLA 2005-01-20 11:28:54 EST
*** Bug 83312 has been marked as a duplicate of this bug. ***
Comment 3 David Audel CLA 2005-02-16 06:18:17 EST
Verified in I20050215-2300