Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 322422 - Content type parameter not used correctly on ProjectResourceSet.createResource api
Summary: Content type parameter not used correctly on ProjectResourceSet.createResourc...
Status: RESOLVED FIXED
Alias: None
Product: WTP Common Tools
Classification: WebTools
Component: wst.common (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.2.2   Edit
Assignee: Chuck Bridgham CLA
QA Contact: Carl Anderson CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 15:18 EDT by Chuck Bridgham CLA
Modified: 2010-08-11 19:31 EDT (History)
1 user (show)

See Also:
ccc: review+


Attachments
patch (848 bytes, patch)
2010-08-11 15:21 EDT, Chuck Bridgham CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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