Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend')
-rw-r--r--org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend11
1 files changed, 8 insertions, 3 deletions
diff --git a/org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend b/org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend
index 583580e..b3ff5a9 100644
--- a/org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend
+++ b/org.eclipse.osbp.utils/src/org/eclipse/osbp/utils/common/EntityUtils.xtend
@@ -3,9 +3,11 @@
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
+ * are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
+ * https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
@@ -161,12 +163,15 @@ class EntityUtils {
}
def static LEntity getEntityFromDto(JvmType type) {
+ if(type === null) {
+ return null
+ }
var LEntity entity = null
try {
var qualifiedDtoName = type?.qualifiedName
var resourceSet = type?.eResource?.resourceSet
val objectDescs = ServiceListener.getEObjectDescriptions(OSBPDtoPackage.Literals.LDTO, qualifiedDtoName)
- if (objectDescs?.iterator.hasNext) {
+ if (objectDescs !== null && objectDescs.iterator.hasNext) {
val eobjectDesc = objectDescs.iterator.next
if (resourceSet !== null) {
var dto = resourceSet.getEObject(eobjectDesc.EObjectURI, true) as LDto

Back to the top