Skip to content

Commit 00037ac

Browse files
committed
Fix Sonatype suggestion
Signed-off-by: manick02 <[email protected]>
1 parent 1c7329a commit 00037ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ 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 || end.getProduceEvents() != null || end.getProduceEvents().size() != 0) {
157+
if (end == null) continue;
158+
if (end.getProduceEvents() != null || end.getProduceEvents().size() != 0) {
158159
end.getProduceEvents()
159160
.forEach(produceEvent -> uniqueEvents.add(produceEvent.getEventRef()));
160161
}

0 commit comments

Comments
 (0)