Skip to content

Commit

Permalink
remove unreachable code (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
duoertai committed Jun 30, 2023
1 parent 285ca39 commit 0a15f76
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/main/java/io/iworkflow/core/UnregisteredClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ public <T> T getSimpleWorkflowResultWithWait(
}

String checkErrorMessage = "this workflow should have one or zero state output for using this API";
Preconditions.checkNotNull(workflowGetResponse.getResults(), checkErrorMessage);
final List<StateCompletionOutput> filteredResults = workflowGetResponse.getResults().stream().filter((res) -> res.getCompletedStateOutput() != null).collect(Collectors.toList());

Preconditions.checkArgument(workflowGetResponse.getResults().size() == 1 || filteredResults.size() == 1, checkErrorMessage + ", found " + workflowGetResponse.getResults().size() + ", after filtered NULL: " + filteredResults.size());

final StateCompletionOutput output;
Expand Down

0 comments on commit 0a15f76

Please sign in to comment.