From fd1adb67f0270ff6a9561dc433a5ce9b242e387e Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 1 Jun 2021 15:38:52 +0300 Subject: [PATCH] Apply tiny polish to DevMojo --- .../src/main/java/io/quarkus/maven/DevMojo.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java index 23f33c90c7318..5ed811e94ae07 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java @@ -104,7 +104,7 @@ public class DevMojo extends AbstractMojo { * running any one of these phases means the compile phase will have been run, if these have * not been run we manually run compile */ - private static final Set POST_COMPILE_PHASES = new HashSet<>(Arrays.asList( + private static final Set POST_COMPILE_PHASES = Set.of( "compile", "process-classes", "generate-test-sources", @@ -121,13 +121,13 @@ public class DevMojo extends AbstractMojo { "post-integration-test", "verify", "install", - "deploy")); + "deploy"); /** * running any one of these phases means the test-compile phase will have been run, if these have * not been run we manually run test-compile */ - private static final Set POST_TEST_COMPILE_PHASES = new HashSet<>(Arrays.asList( + private static final Set POST_TEST_COMPILE_PHASES = Set.of( "test-compile", "process-test-classes", "test", @@ -138,7 +138,7 @@ public class DevMojo extends AbstractMojo { "post-integration-test", "verify", "install", - "deploy")); + "deploy"); private static final String QUARKUS_PLUGIN_GROUPID = "io.quarkus"; private static final String QUARKUS_PLUGIN_ARTIFACTID = "quarkus-maven-plugin"; private static final String QUARKUS_GENERATE_CODE_GOAL = "generate-code"; @@ -697,7 +697,7 @@ Collection pomFiles() { } boolean alive() { - return process == null ? false : process.isAlive(); + return process != null && process.isAlive(); } int exitValue() { @@ -730,8 +730,8 @@ public void run() { process.destroy(); try { process.waitFor(); - } catch (InterruptedException ignored) { - getLog().warn("Unable to properly wait for dev-mode end", ignored); + } catch (InterruptedException e) { + getLog().warn("Unable to properly wait for dev-mode end", e); } } }, "Development Mode Shutdown Hook"));