diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java index 956680bdc5..7982b0ad8e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StopMojo.java @@ -74,8 +74,7 @@ public class StopMojo extends AbstractMojo { return; } getLog().info("Stopping application..."); - try (JMXConnector connector = SpringApplicationAdminClient - .connect(this.jmxPort)) { + try (JMXConnector connector = SpringApplicationAdminClient.connect(this.jmxPort)) { MBeanServerConnection connection = connector.getMBeanServerConnection(); stop(connection); } @@ -85,14 +84,13 @@ public class StopMojo extends AbstractMojo { } } - private void stop(MBeanServerConnection connection) throws IOException, MojoExecutionException { + private void stop(MBeanServerConnection connection) throws IOException, MojoExecutionException { try { new SpringApplicationAdminClient(connection, this.jmxName).stop(); } catch (InstanceNotFoundException ex) { throw new MojoExecutionException( - "Spring application lifecycle JMX bean not found. Could not stop application gracefully", - ex); + "Spring application lifecycle JMX bean not found. Could not stop application gracefully", ex); } }