Bug 39174 - NPE in type hierarchy when opening type
Summary: NPE in type hierarchy when opening type
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 41355 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-20 11:16 EDT by Knut Radloff CLA
Modified: 2003-08-28 04:44 EDT (History)
0 users

See Also:


Attachments
log file (896 bytes, text/plain)
2003-06-20 11:17 EDT, Knut Radloff CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Knut Radloff CLA 2003-06-20 11:16:41 EDT
build 20030611

-had the type org.eclipse.jface.util.OpenStrategy shown in the hierachy view
-hit F4 on a type in a different Java editor
->got a NullPointerException in TypeHierarchy.removeTypeHierarchyChangedListener
Comment 1 Knut Radloff CLA 2003-06-20 11:17:03 EDT
Created attachment 5256 [details]
log file
Comment 2 Philipe Mulet CLA 2003-07-16 17:54:07 EDT
Jerome - didn't you fix this one already?
Comment 3 Jerome Lanneluc CLA 2003-07-17 05:19:05 EDT
This is a different problem. The NPE happens in the following code:

	if (this.changeListeners == null) {
		return;
	}
	this.changeListeners.remove(listener);
	if (this.changeListeners.isEmpty()) { // <----------- NPE here
		deactivate();
	}

Sounds like a jit problem. Knut do you remember the VM version you were using?

Will work around the problem by using a local var.
Comment 4 Knut Radloff CLA 2003-07-17 10:35:30 EDT
I was probably running on J2SC20030611. If not that then the next older SC 
version.
Comment 5 Jerome Lanneluc CLA 2003-07-23 05:22:32 EDT
Fixed by using a local var and synchronizing the 
removeTypeHierarchyChangedListener(...) method.
Comment 6 Jerome Lanneluc CLA 2003-08-21 11:38:52 EDT
*** Bug 41355 has been marked as a duplicate of this bug. ***
Comment 7 David Audel CLA 2003-08-28 04:44:50 EDT
Verified.