[Fix] State.isExecuted() is also valid for CLOSED
This commit is contained in:
parent
9636be57c7
commit
c789f9fc88
|
@ -136,7 +136,7 @@ public enum State {
|
||||||
* @return true if the state is {@link #EXECUTED}
|
* @return true if the state is {@link #EXECUTED}
|
||||||
*/
|
*/
|
||||||
public boolean isExecuted() {
|
public boolean isExecuted() {
|
||||||
return this == EXECUTED;
|
return this == EXECUTED || this == CLOSED;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -275,5 +275,4 @@ public enum State {
|
||||||
// should never happen, unless new state is introduced
|
// should never happen, unless new state is introduced
|
||||||
throw new IllegalStateException("Unhandled situation with states: " + states.stream().map(e -> e.state)
|
throw new IllegalStateException("Unhandled situation with states: " + states.stream().map(e -> e.state)
|
||||||
.collect(Collectors.joining(", ")));
|
.collect(Collectors.joining(", ")));
|
||||||
}
|
}}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue