Bug 3436

Summary: NPW in TypeHierarchy (1GL0L8D)
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2    
Version: 2.0   
Target Milestone: 2.0 M1   
Hardware: All   
OS: Windows NT   
Whiteboard:

Description Martin Aeschlimann CLA 2001-10-10 22:55:05 EDT
MA (03.10.2001 11:44:04)
	Found the walkback in my console. Could not reproduce.

2 org.eclipse.core.resources 2 Problems occurred when invoking code from plug-in: org.eclipse.core.resources.
java.lang.NullPointerException
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByPackageFragmentRoot(TypeHierarchy.java:908)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChildren(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByJavaProject(TypeHierarchy.java:872)
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffectedByChildren(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.isAffected(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.hierarchy.TypeHierarchy.elementChanged(TypeHierarchy.java(Compiled Code))
	at org.eclipse.jdt.internal.core.JavaModelManager.fire(JavaModelManager.java(Compiled Code))
	at org.eclipse.jdt.internal.core.JavaModelManager.resourceChanged(JavaModelManager.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager$1.run(NotificationManager.java(Compiled Code))
	at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java(Compiled Code))
	at org.eclipse.core.runtime.Platform.run(Platform.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java(Compiled Code))
	at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.broadcastChanges(Workspace.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java(Compiled Code))
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java(Compiled Code))
	at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:78)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:98)


NOTES:
Comment 1 Philipe Mulet CLA 2001-10-11 09:57:39 EDT
Please do a code examination, and close if not obvious.
Comment 2 Jerome Lanneluc CLA 2001-10-15 07:31:36 EDT
Must be a concurrency problem: the hierarchy is notified with an 
ElementChangedEvent while it is refreshed. 

Added protection in TypeHierarchy.elementChanged(ElementChangedEvent) to 
process the event only if the hierarchy is activated.
Comment 3 DJ Houghton CLA 2001-10-29 17:13:56 EST
PRODUCT VERSION:
	202