summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Efftinge2011-08-25 03:32:18 (EDT)
committerEd Merks2011-08-25 03:32:18 (EDT)
commitdd5b4143e2adb263cb96376e767fdeacd984fabc (patch)
treed1404abf1fd5c223929e6d97ea3f17e3264cc0ab
parenta07530bce1812dab7ca582fbf5da600b192237d1 (diff)
downloadorg.eclipse.emf-dd5b4143e2adb263cb96376e767fdeacd984fabc.zip
org.eclipse.emf-dd5b4143e2adb263cb96376e767fdeacd984fabc.tar.gz
org.eclipse.emf-dd5b4143e2adb263cb96376e767fdeacd984fabc.tar.bz2
some null guards
-rw-r--r--org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/LazyCreationProxyUriConverter.java6
-rw-r--r--org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreResourceDescriptionStrategy.java8
2 files changed, 11 insertions, 3 deletions
diff --git a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/LazyCreationProxyUriConverter.java b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/LazyCreationProxyUriConverter.java
index fce8b7a..84c2935 100644
--- a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/LazyCreationProxyUriConverter.java
+++ b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/LazyCreationProxyUriConverter.java
@@ -34,6 +34,12 @@ public class LazyCreationProxyUriConverter {
}
public void installProxyURI(URI resourceURI, EObject eobject, QualifiedName name) {
+ if (resourceURI == null)
+ throw new NullPointerException("resourceURI");
+ if (eobject == null)
+ throw new NullPointerException("eobject");
+ if (name == null)
+ throw new NullPointerException("name");
URI proxyURI = getProxyURI(resourceURI, eobject, name);
((InternalEObject) eobject).eSetProxyURI(proxyURI);
}
diff --git a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreResourceDescriptionStrategy.java b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreResourceDescriptionStrategy.java
index f464bb9..f7abf2d 100644
--- a/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreResourceDescriptionStrategy.java
+++ b/org.eclipse.emf.ecore.xcore/src/org/eclipse/emf/ecore/xcore/scoping/XcoreResourceDescriptionStrategy.java
@@ -39,9 +39,11 @@ public class XcoreResourceDescriptionStrategy extends DefaultResourceDescription
public boolean createEObjectDescriptions(EObject eObject, IAcceptor<IEObjectDescription> acceptor) {
if (eObject instanceof XClass) {
QualifiedName qn = nameProvider.getFullyQualifiedName(eObject);
- createGenModelDescription(eObject.eResource().getURI(), acceptor, qn);
- createEcoreDescription(eObject.eResource().getURI(), acceptor, qn);
- createJvmTypesDescription(eObject.eResource().getURI(), acceptor, qn);
+ if (qn != null) {
+ createGenModelDescription(eObject.eResource().getURI(), acceptor, qn);
+ createEcoreDescription(eObject.eResource().getURI(), acceptor, qn);
+ createJvmTypesDescription(eObject.eResource().getURI(), acceptor, qn);
+ }
return false;
}
return true;