Skip to content

Commit

Permalink
Issue #91 Added check to avoid NPE in NonFinalClauseMapping.createClause
Browse files Browse the repository at this point in the history
  • Loading branch information
seidewitz committed Jan 6, 2020
1 parent b174c44 commit 63a1ea2
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,22 @@ public NonFinalClause getNonFinalClause() {
}

public static Clause createClause(
Collection<Element> testElements, ActivityNode decider,
Collection<Element> testElements,
ActivityNode decider,
Collection<Element> bodyElements,
Map<String, AssignedSource> bodyAssignments,
List<AssignedSource> assignmentsAfter,
Collection<Element> modelElements,
FumlMapping parentMapping) throws MappingError {
Clause clause = parentMapping.create(Clause.class);

if (testElements.size() == 1 &&
if (decider == null) {
ValueSpecificationAction valueAction = parentMapping.createActivityGraph().
addBooleanValueSpecificationAction(false);
clause.addTest(valueAction);
modelElements.add(valueAction);
decider = valueAction.getResult();
} else if (testElements.size() == 1 &&
testElements.toArray()[0] instanceof ExecutableNode &&
decider instanceof OutputPin) {
modelElements.addAll(testElements);
Expand Down

0 comments on commit 63a1ea2

Please sign in to comment.