Bug 64299 - NullPointerException when OverrideIndicatorLabelDecorator is decorating
Summary: NullPointerException when OverrideIndicatorLabelDecorator is decorating
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.0 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-27 06:03 EDT by Gunnar Wagenknecht CLA
Modified: 2004-05-28 15:42 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 Gunnar Wagenknecht CLA 2004-05-27 06:03:09 EDT
3.0 M9


java.lang.NullPointerException
	at 
org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypesFor
(SourceTypeBinding.java:794)
	at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.methods
(SourceTypeBinding.java:690)
	at org.eclipse.jdt.core.dom.TypeBinding.getDeclaredMethods
(TypeBinding.java:380)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInType
(Bindings.java:248)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy
(Bindings.java:299)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy
(Bindings.java:304)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy
(Bindings.java:304)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodInHierarchy
(Bindings.java:304)
	at org.eclipse.jdt.internal.corext.dom.Bindings.findMethodDefininition
(Bindings.java:337)
	at 
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.findInHierarchyWithAST
(OverrideIndicatorLabelDecorator.java:170)
	at 
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.getOverrideIndicators
(OverrideIndicatorLabelDecorator.java:151)
	at 
org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.computeAdornmentFlags
(OverrideIndicatorLabelDecorator.java:126)
	at org.eclipse.jdt.ui.OverrideIndicatorLabelDecorator.decorate
(OverrideIndicatorLabelDecorator.java:239)
	at 
org.eclipse.ui.internal.decorators.LightweightDecoratorDefinition.decorate
(LightweightDecoratorDefinition.java:155)
	at 
org.eclipse.ui.internal.decorators.LightweightDecoratorManager$LightweightRunna
ble.run(LightweightDecoratorManager.java:60)
	at org.eclipse.core.internal.runtime.InternalPlatform.run
(InternalPlatform.java:608)
	at org.eclipse.core.runtime.Platform.run(Platform.java:758)
	at 
org.eclipse.ui.internal.decorators.LightweightDecoratorManager.decorate
(LightweightDecoratorManager.java:258)
	at 
org.eclipse.ui.internal.decorators.LightweightDecoratorManager.getDecorations
(LightweightDecoratorManager.java:241)
	at org.eclipse.ui.internal.decorators.DecorationScheduler$1.run
(DecorationScheduler.java:283)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:66)
Comment 1 Frederic Fusier CLA 2004-05-27 09:30:03 EDT
Do you have any scenario to help us to reproduce this problem?
Comment 2 Olivier Thomann CLA 2004-05-27 10:25:29 EDT
I think this is similar to bug 63550. This should be a case where a lookup is
performed after the compilation unit has been cleaned up. Therefore any access
to scopes will result in a NPE.
I believe we should fix it for now by catching RuntimeException where we are
currently catching AbortCompilation.
Comment 3 Olivier Thomann CLA 2004-05-28 11:06:40 EDT
Fixed by catching RuntimeException. This seems to be a case where no scopes are
available anymore. If we change our strategy of removing scopes at the end of
the DOM/AST creation I will revisit this one.
Fixed and released in HEAD.
Comment 4 Olivier Thomann CLA 2004-05-28 15:42:52 EDT
Could not reproduce. No test case available, but the try/catch should handle
that case now.
Verified in 200405281200. Please reopen if you see it with a newer build.