Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2006-06-03 00:55:51 +0000
committerkhussey2006-06-03 00:55:51 +0000
commited8903e6794b948b850925a48974393d47ec6317 (patch)
tree41aa118172bd11a471de3825b982891688a2063c
parentf7fdaca821f9df57436aee2d678ac35d8e6116eb (diff)
downloadorg.eclipse.uml2.test-ed8903e6794b948b850925a48974393d47ec6317.tar.gz
org.eclipse.uml2.test-ed8903e6794b948b850925a48974393d47ec6317.tar.xz
org.eclipse.uml2.test-ed8903e6794b948b850925a48974393d47ec6317.zip
[145075] Not attaching cache adapter to proxies.
-rw-r--r--plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/CacheAdapter.java21
1 files changed, 12 insertions, 9 deletions
diff --git a/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/CacheAdapter.java b/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/CacheAdapter.java
index 5fd52f7f..a555f1fd 100644
--- a/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/CacheAdapter.java
+++ b/plugins/org.eclipse.uml2.common/src/org/eclipse/uml2/common/util/CacheAdapter.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: CacheAdapter.java,v 1.10 2006/02/21 14:31:31 khussey Exp $
+ * $Id: CacheAdapter.java,v 1.11 2006/06/03 00:55:51 khussey Exp $
*/
package org.eclipse.uml2.common.util;
@@ -73,17 +73,20 @@ public class CacheAdapter
}
protected void addAdapter(EObject eObject) {
- Resource eResource = eObject.eResource();
- if (eResource == null) {
- addAdapter(EcoreUtil.getRootContainer(eObject).eAdapters());
- } else {
- ResourceSet resourceSet = eResource.getResourceSet();
+ if (eObject != null && !eObject.eIsProxy()) {
+ Resource eResource = eObject.eResource();
- if (resourceSet == null) {
- addAdapter(eResource.eAdapters());
+ if (eResource == null) {
+ addAdapter(EcoreUtil.getRootContainer(eObject).eAdapters());
} else {
- addAdapter(resourceSet.eAdapters());
+ ResourceSet resourceSet = eResource.getResourceSet();
+
+ if (resourceSet == null) {
+ addAdapter(eResource.eAdapters());
+ } else {
+ addAdapter(resourceSet.eAdapters());
+ }
}
}
}

Back to the top