Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 100569 Details for
Bug 231430
Proxy resolution failures should be cached
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Handle a failure to create an stream just as if the resource were loaded from an empty stream
231430.patch (text/plain), 2.21 KB, created by
Ed Merks
on 2008-05-15 18:33:33 EDT
(
hide
)
Description:
Handle a failure to create an stream just as if the resource were loaded from an empty stream
Filename:
MIME Type:
Creator:
Ed Merks
Created:
2008-05-15 18:33:33 EDT
Size:
2.21 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.emf.ecore >Index: src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java >=================================================================== >RCS file: /cvsroot/modeling/org.eclipse.emf/org.eclipse.emf/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java,v >retrieving revision 1.25 >diff -u -r1.25 ResourceImpl.java >--- src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java 20 Oct 2007 14:43:40 -0000 1.25 >+++ src/org/eclipse/emf/ecore/resource/impl/ResourceImpl.java 15 May 2008 22:32:26 -0000 >@@ -1201,22 +1201,52 @@ > { > response = new HashMap<Object, Object>(); > } >- InputStream inputStream = >- uriConverter.createInputStream >- (getURI(), >- new ExtensibleURIConverterImpl.OptionsMap(URIConverter.OPTION_RESPONSE, response, options)); >+ >+ // If an input stream can't be created, ensure that the resource is still considered loaded after the failure, >+ // and do all the same processing we'd do if we actually were able to create a valid input stream. >+ // >+ InputStream inputStream = null; >+ try >+ { >+ inputStream = >+ uriConverter.createInputStream >+ (getURI(), >+ new ExtensibleURIConverterImpl.OptionsMap(URIConverter.OPTION_RESPONSE, response, options)); >+ } >+ catch (IOException exception) >+ { >+ Notification notification = setLoaded(true); >+ isLoading = true; >+ if (errors != null) >+ { >+ errors.clear(); >+ } >+ if (warnings != null) >+ { >+ warnings.clear(); >+ } >+ isLoading = false; >+ if (notification != null) >+ { >+ eNotify(notification); >+ } >+ setModified(false); >+ >+ throw exception; >+ } >+ > try > { > load(inputStream, options); > } > finally > { >+ inputStream.close(); > Long timeStamp = (Long)response.get(URIConverter.RESPONSE_TIME_STAMP_PROPERTY); > if (timeStamp != null) > { > setTimeStamp(timeStamp); > } >- inputStream.close(); > } > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 231430
:
100544
| 100569