Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 324387 - Illogical Code at PasswordProviderSelector.stop() method
Summary: Illogical Code at PasswordProviderSelector.stop() method
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: Security (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Security Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-03 05:49 EDT by Heiko Techteam CLA
Modified: 2010-09-27 15:09 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 Heiko Techteam CLA 2010-09-03 05:49:38 EDT
Build Identifier: I20100608-0911

Inside the PasswordProviderSelector at instance creation, you do add himself as IRegistryEventListener.

Inside the stop() method you did it again:

public void stop() {
   if (instance != null) {
	IExtensionRegistry registry = RegistryFactory.getRegistry();
	registry.addListener(instance, EXTENSION_POINT);
	instance = null;
}
	}


At this point, should not do unregister this listener? with:

public void stop() {
   if (instance != null) {
	IExtensionRegistry registry = RegistryFactory.getRegistry();
	registry.removeListener(instance);
	instance = null;
}

Reproducible: Always
Comment 1 Oleg Besedin CLA 2010-09-27 15:09:37 EDT
You are quite correct, that was probably a copy/paste artifact. Fixed in CVS Head. Thank you for taking time to figure this out!