### 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(); } - 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(); } } }