Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 443903

Summary: [1.8][compiler][null] Internal compiler error: java.lang.NullPointerException at ProblemReporter.contradictoryNullAnnotationsOnBounds
Product: [Eclipse Project] JDT Reporter: David ten Hove <David.tenHove>
Component: CoreAssignee: Stephan Herrmann <stephan.herrmann>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: srikanth_sankaran
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug
Attachments:
Description Flags
Class file with null annotations to reproduce the problem none

Description David ten Hove CLA 2014-09-12 03:32:25 EDT
Created attachment 246995 [details]
Class file with null annotations to reproduce the problem

To reproduce, try to compile the attached class.

I'm getting the following exception:

Message: Error in JDT Core during AST creation

java.lang.NullPointerException
	at org.eclipse.jdt.internal.compiler.problem.ProblemReporter.contradictoryNullAnnotationsOnBounds(ProblemReporter.java:9522)
	at org.eclipse.jdt.internal.compiler.lookup.TypeVariableBinding.evaluateNullAnnotations(TypeVariableBinding.java:801)
	at org.eclipse.jdt.internal.compiler.ast.TypeParameter.resolveAnnotations(TypeParameter.java:124)
	at org.eclipse.jdt.internal.compiler.ast.TypeParameter.internalResolve(TypeParameter.java:104)
	at org.eclipse.jdt.internal.compiler.ast.TypeParameter.resolve(TypeParameter.java:109)
	at org.eclipse.jdt.internal.compiler.lookup.MethodScope.resolveTypeParameter(MethodScope.java:563)
	at org.eclipse.jdt.internal.compiler.lookup.Scope.connectTypeVariables(Scope.java:1070)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor(SourceTypeBinding.java:1790)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods(SourceTypeBinding.java:1463)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:851)
	at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:450)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1197)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:689)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1183)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:809)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:544)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:537)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:480)
	at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:128)
	at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:170)
	at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup$3.run(SelectionListenerWithASTManager.java:155)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Session data:
eclipse.buildId=4.4.0.I20140606-1215
java.version=1.8.0
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.standard.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.standard.product
Comment 1 Stephan Herrmann CLA 2014-09-12 17:03:43 EDT
I can reproduce with 4.4 but in 4.5 M1 this is fixed, assumably via bug 438250.

I'll validate that assumption and add a regression test before closing.
Comment 2 Eclipse Genie CLA 2019-11-04 20:33:09 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.