Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347615 - IResourceManager#register( String, InputStream ) should not close the InputStream
Summary: IResourceManager#register( String, InputStream ) should not close the InputSt...
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-30 05:45 EDT by Rüdiger Herrmann CLA
Modified: 2012-11-05 08:17 EST (History)
0 users

See Also:


Attachments

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