Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenoit Maggi2017-04-27 07:09:21 +0000
committerGerrit Code Review @ Eclipse.org2017-04-27 09:14:08 +0000
commitb40f64bd3f08f385925d286ee8a89b64ff5e757c (patch)
tree2726bd2c4b042543562f9966384ec4340149ddaf /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus
parent4f2c415d54196f475a899f6b3f001232393a0137 (diff)
downloadorg.eclipse.papyrus-b40f64bd3f08f385925d286ee8a89b64ff5e757c.tar.gz
org.eclipse.papyrus-b40f64bd3f08f385925d286ee8a89b64ff5e757c.tar.xz
org.eclipse.papyrus-b40f64bd3f08f385925d286ee8a89b64ff5e757c.zip
Bug 515287 - [Activity] Applying a stereotype to ActivityEdge causes NPE
- return false instead of NPE in the problematic tests Change-Id: Ibf551c3ca5a1d4257e33313025f8261b661bc301 Signed-off-by: Benoit Maggi <benoit.maggi@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinAndParameterSynchronizer.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java2
5 files changed, 5 insertions, 5 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinAndParameterSynchronizer.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinAndParameterSynchronizer.java
index 7c5732dbf60..f1e05b7fd9d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinAndParameterSynchronizer.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/helper/PinAndParameterSynchronizer.java
@@ -403,7 +403,7 @@ public class PinAndParameterSynchronizer extends AbstractModelConstraint {
boolean multiplicity = UMLPackage.eINSTANCE.getMultiplicityElement_IsUnique().equals(modifiedFeature) || UMLPackage.eINSTANCE.getMultiplicityElement_Lower().equals(modifiedFeature)
|| UMLPackage.eINSTANCE.getMultiplicityElement_LowerValue().equals(modifiedFeature) || UMLPackage.eINSTANCE.getMultiplicityElement_Upper().equals(modifiedFeature)
|| UMLPackage.eINSTANCE.getMultiplicityElement_UpperValue().equals(modifiedFeature);
- boolean inAValueSpecification = ValueSpecification.class.isAssignableFrom(modifiedFeature.getContainerClass());
+ boolean inAValueSpecification = modifiedFeature != null && ValueSpecification.class.isAssignableFrom(modifiedFeature.getContainerClass());
return type || ordering || multiplicity || inAValueSpecification;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
index 687df7a28cf..59ed4294f0a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/ActivityEdgeWeightParser.java
@@ -186,6 +186,6 @@ public class ActivityEdgeWeightParser extends MessageFormatParser implements ISe
* @return true if is valid, false otherwise
*/
private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getActivityEdge_Weight().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ return UMLPackage.eINSTANCE.getActivityEdge_Weight().equals(feature) || (feature != null && ValueSpecification.class.isAssignableFrom(feature.getContainerClass()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
index 2626e8832d0..d4103266ab4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/EdgeGuardParser.java
@@ -186,6 +186,6 @@ public class EdgeGuardParser extends MessageFormatParser implements ISemanticPar
* @return true if is valid, false otherwise
*/
private boolean isValidFeature(EStructuralFeature feature) {
- return UMLPackage.eINSTANCE.getActivityEdge_Guard().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ return UMLPackage.eINSTANCE.getActivityEdge_Guard().equals(feature) || (feature != null && ValueSpecification.class.isAssignableFrom(feature.getContainerClass()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
index a110d30bb8a..7d9a0c24a50 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/JoinSpecParser.java
@@ -181,6 +181,6 @@ public class JoinSpecParser extends MessageFormatParser implements ISemanticPars
if (feature == null){
return false;
}
- return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getJoinNode_JoinSpec().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getJoinNode_JoinSpec().equals(feature) || (feature != null && ValueSpecification.class.isAssignableFrom(feature.getContainerClass()));
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
index 203bce96dd2..702a5fc0ef5 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/custom-src/org/eclipse/papyrus/uml/diagram/activity/parser/custom/PinValueParser.java
@@ -244,6 +244,6 @@ public class PinValueParser extends MessageFormatParser implements ISemanticPars
*/
private boolean isValidFeature(EStructuralFeature feature) {
return UMLPackage.eINSTANCE.getNamedElement_Name().equals(feature) || UMLPackage.eINSTANCE.getValuePin_Value().equals(feature) || UMLPackage.eINSTANCE.getActionInputPin_FromAction().equals(feature)
- || UMLPackage.eINSTANCE.getVariableAction_Variable().equals(feature) || UMLPackage.eINSTANCE.getValueSpecificationAction_Value().equals(feature) || ValueSpecification.class.isAssignableFrom(feature.getContainerClass());
+ || UMLPackage.eINSTANCE.getVariableAction_Variable().equals(feature) || UMLPackage.eINSTANCE.getValueSpecificationAction_Value().equals(feature) || (feature != null && ValueSpecification.class.isAssignableFrom(feature.getContainerClass()));
}
}

Back to the top