Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2020-09-30 11:51:50 +0000
committerPatrick Tessier2020-10-01 13:42:07 +0000
commit7751d2d382d8711238514fd8f06fe033cc0a4da5 (patch)
tree8d42f380fdb107b220071e0247d4bb8d9c702031 /plugins
parentd43b3a6a56e44c02a721a30ad87b0fa2855e0953 (diff)
downloadorg.eclipse.papyrus-7751d2d382d8711238514fd8f06fe033cc0a4da5.tar.gz
org.eclipse.papyrus-7751d2d382d8711238514fd8f06fe033cc0a4da5.tar.xz
org.eclipse.papyrus-7751d2d382d8711238514fd8f06fe033cc0a4da5.zip
Bug 567454 - Null pointer exception editing opaque expression in MultiplicityUpperValueDirectEditorConstraint
- Avoid possible NPE, if upperValue is unset. (on behalf of Jabier Martinez) Signed-off-by: Ansgar Radermacher <ansgar.radermacher@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java
index 17f70e27f38..5acb2099ca0 100644
--- a/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java
+++ b/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui/src/org/eclipse/papyrus/uml/textedit/valuespecification/xtext/ui/constraint/MultiplicityUpperValueDirectEditorConstraint.java
@@ -1,6 +1,6 @@
/*****************************************************************************
- * Copyright (c) 2015 CEA LIST.
- *
+ * Copyright (c) 2015,2020 CEA LIST.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,8 @@
*
* Contributors:
* Nicolas FAUVERGUE (ALL4TEC) nicolas.fauvergue@all4tec.net - Initial API and implementation
- *
+ * Ansgar Radermacher (CEA LIST) Ansgar.Radermacher@cea.fr - bug567454
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui.constraint;
@@ -60,7 +61,7 @@ public class MultiplicityUpperValueDirectEditorConstraint implements IDirectEdit
if (valueSpecification.eContainer() instanceof MultiplicityElement) {
final EObject parent = valueSpecification.eContainer();
final Object upperValue = parent.eGet(UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue());
- appliedConstraint = upperValue.equals(valueSpecification);
+ appliedConstraint = valueSpecification.equals(upperValue);
}
}
return appliedConstraint;

Back to the top