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

Bug 322422

Summary: Content type parameter not used correctly on ProjectResourceSet.createResource api
Product: [WebTools] WTP Common Tools Reporter: Chuck Bridgham <cbridgha>
Component: wst.commonAssignee: Chuck Bridgham <cbridgha>
Status: RESOLVED FIXED QA Contact: Carl Anderson <ccc>
Severity: normal    
Priority: P3 CC: ccc
Version: 3.2.1Flags: ccc: review+
Target Milestone: 3.2.2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
patch none

Description Chuck Bridgham CLA 2010-08-11 15:18:05 EDT
The API on ProjectResourceSet

public Resource createResource(URI uri, String contentType) {

Is meant to create an EMF Resource document with the given URI, and in many cases.. the URI has an embedded content type key that is used.

The contentType that is passed is meant as another way to control what ResourceFactory to be used.

Currently - this parameter is ignored
Comment 1 Chuck Bridgham CLA 2010-08-11 15:21:39 EDT
Created attachment 176390 [details]
patch

This patch is very safe, and doesn't change the behavior of an embedded contentType being used from the URI.

If no contentType is found... then the passed parameter is used
Comment 2 Carl Anderson CLA 2010-08-11 16:25:53 EDT
I approve
Comment 3 Carl Anderson CLA 2010-08-11 19:31:39 EDT
Committed to HEAD for WTP 3.2.2 and WTP 3.3