spring-boot/spring-boot-tools
Andy Wilkinson 2dc3660a32 Align launcher exception handling with direct invocation of main method
Previously, if an application’s main method threw an exception,
MainMethodRunner would catch the exception and call System.exit(1).
This meant that the JVM would exit, irrespective of whether or not
any non-daemon threads were running. In contrast, when an application’s
main method was invoked directly (in an IDE, for example) the JVM
would not exit if one or more non-daemon threads were running. This
is standard JVM behaviour that we should be consistent with in the
launcher.

This commit updates MainMethodRunner to wrap any exception thrown by an
application’s main method in a RuntimeException and rethrow it. This
alllows the JVM to handle the exception and use its normal rules for
deciding whether or not it should exit.

Closes gh-4984
2016-01-21 09:57:13 +00:00
..
spring-boot-antlib Next Development Version 2015-12-18 05:43:02 -08:00
spring-boot-configuration-metadata Next Development Version 2015-12-18 05:43:02 -08:00
spring-boot-configuration-processor Next Development Version 2015-12-18 05:43:02 -08:00
spring-boot-gradle-plugin Next Development Version 2015-12-18 05:43:02 -08:00
spring-boot-loader Align launcher exception handling with direct invocation of main method 2016-01-21 09:57:13 +00:00
spring-boot-loader-tools Resend SIGTERM if app is still running 30 seconds after first attempt 2016-01-14 10:37:45 +00:00
spring-boot-maven-plugin Add property to skip integration tests 2016-01-18 09:45:06 +01:00
pom.xml Next Development Version 2015-12-18 05:43:02 -08:00