Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 321743

Summary: ProjectResourceSetImpl.setResourceFactoryRegistry(Registry) does not maintain content type mappings
Product: [WebTools] WTP Common Tools Reporter: Paul Fullbright <paul.fullbright>
Component: wst.commonAssignee: Carl Anderson <ccc>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: major    
Priority: P3 Flags: ccc: iplog+
Version: 3.2   
Target Milestone: 3.3 M1   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Paul Fullbright CLA 2010-08-04 11:34:06 EDT
The method setResourceFactoryRegistry(Registry) has the following lines:

preserveEntries(factoryReg.getExtensionToFactoryMap(), resourceFactoryRegistry.getExtensionToFactoryMap());
preserveEntries(factoryReg.getProtocolToFactoryMap(), resourceFactoryRegistry.getProtocolToFactoryMap());


It should also have the line:

preserveEntries(factoryReg.getContentTypeToFactoryMap(), resourceFactoryRegistry.getContentTypeToFactoryMap());


We depend on content type resource mappings, and maintaining these, should someone else set the registry over the top of us, is of paramount importance.

This should be an easy fix, but of course testing will be needed.  We would like this as early as possible in the 3.3 timeline as possible.
Comment 1 Carl Anderson CLA 2010-08-11 08:38:31 EDT
For the record, the ContentTypeToFactory map was added for EMF 2.4.  WTP updated to EMF 2.4 for 3.0.0, but this new map was not added to the list of maps to be synchronized/maintained.
Comment 2 Carl Anderson CLA 2010-08-11 17:34:41 EDT
Committed to HEAD for WTP 3.3 M1.  Note that I am setting the iplog to + since the patch was put into a comment, instead of attached.