Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2015-10-14 12:36:30 +0000
committerPierre-Charles David2015-10-14 14:19:46 +0000
commit73704c2772d28b059121a51e9b67462eb4fea6b0 (patch)
tree9c8f10171f74f384657c6682557ddd67f6074532
parent1b8392023e51c8332fb949c7bacc5017a3435ca4 (diff)
downloadorg.eclipse.sirius-73704c2772d28b059121a51e9b67462eb4fea6b0.tar.gz
org.eclipse.sirius-73704c2772d28b059121a51e9b67462eb4fea6b0.tar.xz
org.eclipse.sirius-73704c2772d28b059121a51e9b67462eb4fea6b0.zip
[449357] Reincorporate code removed by errorv3.1.0rc3
Since the inheritance changes in 3e7f5ad187ff0e6f42, we lost some custom code from GMF which silenced specific exceptions during resource loading. As a result, these can now be visible to client code which does not expect them and is not ready to handle them. Restore the old treatment of these exceptions as before (it does not require an actual dependency to GMF code). For reference, the exceptions which are silenced, UnresolvedReferenceException, correspond to situations that GMF (and Sirius) can correctly handle by themselves (by being proxy-aware) and thus should not be reported as loading errors to clients. Bug: 449357 Change-Id: I0cce8cb952f77c8ae9a9b936db8e82c14c3d0282 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirdResourceXMILoad.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirdResourceXMILoad.java b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirdResourceXMILoad.java
index 00b15a7140..232c1077fd 100644
--- a/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirdResourceXMILoad.java
+++ b/plugins/org.eclipse.sirius/src/org/eclipse/sirius/business/internal/resource/AirdResourceXMILoad.java
@@ -10,8 +10,11 @@
*******************************************************************************/
package org.eclipse.sirius.business.internal.resource;
+import java.io.IOException;
+import java.io.InputStream;
import java.util.Map;
+import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.xmi.UnresolvedReferenceException;
import org.eclipse.emf.ecore.xmi.XMIException;
import org.eclipse.emf.ecore.xmi.XMLHelper;
@@ -68,6 +71,17 @@ public class AirdResourceXMILoad extends XMILoadImpl {
return new SAXWrapper(new AirdHandler(resource, helper, options));
}
+ @Override
+ public void load(XMLResource r, InputStream s, Map<?, ?> o) throws IOException {
+ try {
+ super.load(r, s, o);
+ } catch (Resource.IOWrappedException e) {
+ if (!(e.getCause() instanceof UnresolvedReferenceException)) {
+ throw e;
+ }
+ }
+ }
+
/**
* A specialization of the SAX XMI handler to delegate to the file migration
* service.

Back to the top