Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-03-10 15:13:10 +0000
committerCamille Letavernier2014-03-10 15:13:10 +0000
commit7d9e1710902d42403aabb1783159249365d8c68d (patch)
treec6115c4e8128fb75a984014e5c8c3fe3ff6e4cce /plugins/uml/diagram
parente9eb2ae9d1d16b7119826e6bbce5da2955533d99 (diff)
downloadorg.eclipse.papyrus-7d9e1710902d42403aabb1783159249365d8c68d.tar.gz
org.eclipse.papyrus-7d9e1710902d42403aabb1783159249365d8c68d.tar.xz
org.eclipse.papyrus-7d9e1710902d42403aabb1783159249365d8c68d.zip
430007: NPE in UMLModelTester.getRoot
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430007
Diffstat (limited to 'plugins/uml/diagram')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java
index c539f1c4d93..ccd7fe52909 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/util/UMLModelTester.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -25,9 +25,9 @@ import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
/**
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class UMLModelTester extends PropertyTester {
@@ -38,6 +38,7 @@ public class UMLModelTester extends PropertyTester {
public final static String IS_UML_PROFILE = "isUMLProfile";
/** Test the receiver against the selected property */
+ @Override
public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
Object currentValue = null;
if(IS_UML_MODEL.equals(property)) {
@@ -69,6 +70,9 @@ public class UMLModelTester extends PropertyTester {
private EObject getRoot(Object receiver) {
ModelSet modelSet = getModelSet(receiver);
+ if(modelSet == null) {
+ return null;
+ }
return getRoot(modelSet);
}

Back to the top