Skip to content

Commit

Permalink
fix(protocol): prevent NullPointerException in BpmnElementType
Browse files Browse the repository at this point in the history
- as the elementTypeName field can be null use Optional.ofNullable in getter
  • Loading branch information
megglos committed Nov 4, 2021
1 parent ef05ef1 commit 10ad6c4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public enum BpmnElementType {
}

public Optional<String> getElementTypeName() {
return Optional.of(elementTypeName);
return Optional.ofNullable(elementTypeName);
}

public static BpmnElementType bpmnElementTypeFor(final String elementTypeName) {
Expand Down

0 comments on commit 10ad6c4

Please sign in to comment.