Skip to content

Commit 62ef635

Browse files
committed
Fix Sonatype NULL DEFERENCE bug
Signed-off-by: manick02 <[email protected]>
1 parent 00037ac commit 62ef635

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

utils/src/main/java/io/serverlessworkflow/utils/WorkflowUtils.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,7 @@ public static List<EventDefinition> getWorkflowProducedEvents(Workflow workflow)
154154
Set<String> uniqueEvents = new HashSet<>();
155155
for (State state : workflow.getStates()) {
156156
End end = state.getEnd();
157-
if (end == null) continue;
158-
if (end.getProduceEvents() != null || end.getProduceEvents().size() != 0) {
157+
if (end != null && end.getProduceEvents() != null && end.getProduceEvents().size() != 0) {
159158
end.getProduceEvents()
160159
.forEach(produceEvent -> uniqueEvents.add(produceEvent.getEventRef()));
161160
}

0 commit comments

Comments
 (0)