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

Bug 347615

Summary: IResourceManager#register( String, InputStream ) should not close the InputStream
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:    

Description Rüdiger Herrmann CLA 2011-05-30 05:45:28 EDT
There are two register-methods that accept an InputStream as a parameter. Unfortunately the current implementation closes the given input stream before it returns.
To align with the common rule that the one who allocates a resource is also responsible for disposing of/closing it, the resource manager should not close input streams.

Event though this may lead to resource leaks in application code that relies on this undocumented 'feature', I suggest to change the IResourceManager implementation to not close the input stream any more.
Comment 1 Rüdiger Herrmann CLA 2012-11-05 08:17:08 EST
Changed ResourceManagerImpl to leave the given input stream open. Changes are in commit c8e8385266053ebc5423492770a50c7af736046e