Closed jvalkeal closed 8 months ago
Boot upgrade in #952.
There is a change between spring-boot 3.2.0 and 3.2.1 in its runner logic where exception is no longer wrapped in IllegalStateException.
3.2.0
3.2.1
IllegalStateException
In below code we used to check cause assuming actual exception is CommandExecution.CommandParserExceptionsException.
CommandExecution.CommandParserExceptionsException
https://github.com/spring-projects/spring-shell/blob/cb8f44ff633fe3d23efc0d4c32ca3111ab8b5bd3/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ExitCodeAutoConfiguration.java#L62-L64
We can mitigate this by checking both exception itself and it's cause(in case user don't compile against the spring-boot version spring-shell is testing).
spring-boot
spring-shell
This also happens with spring-shell 3.1.x as change in spring-boot was backported into 3.1.7.
3.1.x
3.1.7
A bit easier to see from a debugger.
boot 3.2.1:
boot 3.2.0:
Boot upgrade in #952.
There is a change between spring-boot
3.2.0
and3.2.1
in its runner logic where exception is no longer wrapped inIllegalStateException
.In below code we used to check cause assuming actual exception is
CommandExecution.CommandParserExceptionsException
.https://github.com/spring-projects/spring-shell/blob/cb8f44ff633fe3d23efc0d4c32ca3111ab8b5bd3/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ExitCodeAutoConfiguration.java#L62-L64
We can mitigate this by checking both exception itself and it's cause(in case user don't compile against the
spring-boot
versionspring-shell
is testing).This also happens with spring-shell
3.1.x
as change inspring-boot
was backported into3.1.7
.