We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 37bd454 commit d7da889Copy full SHA for d7da889
impl/core/src/main/java/io/serverlessworkflow/impl/WorkflowMutableInstance.java
@@ -139,12 +139,14 @@ public WorkflowModel output() {
139
140
@Override
141
public <T> T outputAs(Class<T> clazz) {
142
- return output
143
- .as(clazz)
144
- .orElseThrow(
145
- () ->
146
- new IllegalArgumentException(
147
- "Output " + output + " cannot be converted to class " + clazz));
+ return output != null
+ ? output
+ .as(clazz)
+ .orElseThrow(
+ () ->
+ new IllegalArgumentException(
148
+ "Output " + output + " cannot be converted to class " + clazz))
149
+ : null;
150
}
151
152
public void status(WorkflowStatus state) {
0 commit comments