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

(cherry picked from commit 10ad6c4)
  • Loading branch information
megglos authored and github-actions[bot] committed Nov 4, 2021
1 parent 6516958 commit 8916fde
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 8916fde

Please sign in to comment.