Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347580 - IResourceManager#register( String, InputStream ) behaves different from #register(String)
Summary: IResourceManager#register( String, InputStream ) behaves different from #regi...
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 393077
Blocks:
  Show dependency tree
 
Reported: 2011-05-29 11:55 EDT by Rüdiger Herrmann CLA
Modified: 2012-11-05 08:05 EST (History)
0 users

See Also:


Attachments
Test cases to demonstrate the described behavior (2.16 KB, patch)
2011-05-29 11:57 EDT, Rüdiger Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-05-29 11:55:24 EDT
If an attempt is made to register a resource twice by using IResourceManager#register(String), this attempt is ignored.
For example:
  resourceManager.rergister( "org/eclipse/rwt/myResource" );
loads the content from the given resource by using the currently set class loader (setContextLoader()) A second call to register() with the same parameter does nothing.
IResourceManager#register(String,InputStream) provides equivalent functionality. It registers the content from the given input stream under the given name. Only if one attempts to register content under a name that was used previously to register something, the second attempt overrides the already registerd content.
IResourceManager#register(String,InputStream) should behave like #register(String) and ignore any attempt to register a resource if the resource name was already used.
Comment 1 Rüdiger Herrmann CLA 2011-05-29 11:57:53 EDT
Created attachment 196851 [details]
Test cases to demonstrate the described behavior
Comment 2 Rüdiger Herrmann CLA 2012-11-05 08:05:12 EST
With the changes for bug 393077, IResourceManager#register(String) was removed.
IResourceManager#register(String,InputStream) still overrides previously registered resources under the same name.