Community
Participate
Working Groups
Noticed this while looking at memory leak issues. I think it is a minor issue but should probably get cleaned up some time. I see our FacesConfigResourceFactory being registered multiple times - any time we create a new FacesConfigArtifactEdit instance and call getFacesConfig(). Seems like the "hack" that is in place (see comment in getFacesConfig()) to check if we've registered the factory is broken. I think we should try to fix this. In addition, each instance is registered, adding to a HashMap in WTPResourceFactoryRegistry. Unfortunately, the key for the HashMap, WTPResourceFactoryRegistryKey, does not override hashCode/equals so though the keys are really the same, it creates references from the map to each of the separate instances of the factory. A separate bug has been logged on about the HashMap key implementation. See bug 328562.
The FacesConfigPlugin inner plugin Implementation class' start() method is the first place to registers the FacesConfigResourceFactory.