Skip to content

Commit

Permalink
Apply tiny polish to DevMojo
Browse files Browse the repository at this point in the history
  • Loading branch information
geoand committed Jun 1, 2021
1 parent 94d7746 commit fd1adb6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> POST_COMPILE_PHASES = new HashSet<>(Arrays.asList(
private static final Set<String> POST_COMPILE_PHASES = Set.of(
"compile",
"process-classes",
"generate-test-sources",
Expand All @@ -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<String> POST_TEST_COMPILE_PHASES = new HashSet<>(Arrays.asList(
private static final Set<String> POST_TEST_COMPILE_PHASES = Set.of(
"test-compile",
"process-test-classes",
"test",
Expand All @@ -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";
Expand Down Expand Up @@ -697,7 +697,7 @@ Collection<Path> pomFiles() {
}

boolean alive() {
return process == null ? false : process.isAlive();
return process != null && process.isAlive();
}

int exitValue() {
Expand Down Expand Up @@ -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"));
Expand Down

0 comments on commit fd1adb6

Please sign in to comment.