Skip to content

Commit da6f7c9

Browse files
committed
Fix for issue #849
1 parent 0437482 commit da6f7c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/gr/uom/java/xmi/decomposition/UMLOperationBodyMapper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8301,7 +8301,9 @@ else if(isIfBranch(grandParent, grandParent.getParent()) && !hasElseBranch(grand
83018301
while(parent != null && parent.getLocationInfo().getCodeElementType().equals(CodeElementType.BLOCK)) {
83028302
parent = parent.getParent();
83038303
}
8304-
grandParents.add(parent);
8304+
if(parent != null) {
8305+
grandParents.add(parent);
8306+
}
83058307
}
83068308
if(container1.getBody() != null && grandParents.size() == 1) {
83078309
CompositeStatementObject grandParent2 = grandParents.iterator().next();

0 commit comments

Comments
 (0)