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

Bug 347580

Summary: IResourceManager#register( String, InputStream ) behaves different from #register(String)
Product: [RT] RAP Reporter: Rüdiger Herrmann <ruediger.herrmann>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 2.0 M3   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 393077    
Bug Blocks:    
Attachments:
Description Flags
Test cases to demonstrate the described behavior none

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.