Bug 196920 - [1.5][compiler] NullPExc. during compilation / build process
Summary: [1.5][compiler] NullPExc. during compilation / build process
Status: VERIFIED DUPLICATE of bug 222326
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-18 04:48 EDT by Steffen Klössel CLA
Modified: 2008-04-28 11:11 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steffen Klössel CLA 2007-07-18 04:48:20 EDT
Build ID: Build id: I20070608-1718

I got a simple nullpointer exception while build a project
that uses java generics intensely. This NullPointerException
was thrown on a class, after I changed the generic signature of another class used by this.

Its not possible for me to create a snipped or excample where you can reproduce this bug - but I this stack-trace should help you to find that null pointer exception.

Internal compiler error java.lang.NullPointerException at 
 org.eclipse.jdt.internal.compiler.lookup.TypeBinding.findSuperTypeWithSameErasure(TypeBinding.j
 ava:273) at 
 org.eclipse.jdt.internal.compiler.lookup.TypeBinding.isTypeArgumentContainedBy(TypeBinding.java
 :635) at 
 org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.isEquivalentTo(ParameterizedTy
 peBinding.java:658) at 
 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.implementsInterface(ReferenceBinding.ja
 va:774) at 
 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isCompatibleWith0(ReferenceBinding.jav
 a:899) at 
 org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isCompatibleWith(ReferenceBinding.java:
 852) at org.eclipse.jdt.internal.compiler.lookup.Scope.greaterLowerBound(Scope.java:137) at 
 org.eclipse.jdt.internal.compiler.lookup.CaptureBinding.initializeBounds(CaptureBinding.java:114) 
 at 
 org.eclipse.jdt.internal.compiler.lookup.ParameterizedTypeBinding.capture(ParameterizedTypeBindi
 ng.java:113) at 
 org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:501) at 
 org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:216) at 
 org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMetho
 dDeclaration.java:429) at 
 org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java
 :196) at 
 org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaratio
 n.java:400) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:
 1085) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1164) 
 at 
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.
 java:366) at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:623) at 
 org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:392) at 
 org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:362) 
 at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.compile(BatchImageBuilder.java:173) at 
 org.eclipse.jdt.internal.core.builder.AbstractImageBuilder.compile(AbstractImageBuilder.java:299) 
 at org.eclipse.jdt.internal.core.builder.BatchImageBuilder.build(BatchImageBuilder.java:59) at 
 org.eclipse.jdt.internal.core.builder.JavaBuilder.buildAll(JavaBuilder.java:269) at 
 org.eclipse.jdt.internal.core.builder.JavaBuilder.build(JavaBuilder.java:177) at 
 org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624) at 
 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166) at 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197) at 
 org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246) at 
 org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at 
 org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249) at 
 org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302) at 
 org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334) at 
 org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137) at 
 org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at 
 org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

More information:
Hints:

the signature of the type that produces this NPE:

public class ContentSignatureWrapper<MASTER extends ContentSignature<?,?,?,?>, COMPONENTS extends Type<?>, CONTENT extends Content<?,?>, KEYTYPE extends DataKey<?,?>> { ....

The method of this type that was wrong afer I changed the generic signature of its return type:

@Override
public Description<CONTENT, ContentSignature<MASTER, COMPONENTS, CONTENT, KEYTYPE>> createDescription(String description) throws DescriptorException { .... 


The same method with corrected return type 
@Override
public Description<CONTENT, ContentSignature<MASTER, ? extends COMPONENTS, CONTENT, KEYTYPE>> createDescription(String description) throws DescriptorException { ....
Comment 1 Kent Johnson CLA 2008-04-22 14:39:54 EDT
Believe this is a duplicate of bug 222326.

Please reopen if the problem is not fixed in 3.4M7

*** This bug has been marked as a duplicate of bug 222326 ***
Comment 2 David Audel CLA 2008-04-28 11:11:33 EDT
Verified for 3.4M7 using I20080427-2000