Skip to content

Commit

Permalink
Avoid very unlikely NPE
Browse files Browse the repository at this point in the history
I was able to reproduce the NPE initially
when adding the test for
#10421.
The way I got around it in that test was to
make sure the compile phase was invoked
  • Loading branch information
geoand committed Jul 3, 2020
1 parent 037850f commit 629fe4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,9 @@ private void handleResources() throws MojoExecutionException {
List<Resource> resources = project.getResources();
if (!resources.isEmpty()) {
Plugin resourcesPlugin = project.getPlugin(ORG_APACHE_MAVEN_PLUGINS + ":" + MAVEN_RESOURCES_PLUGIN);
if (resourcesPlugin == null) {
return;
}
MojoExecutor.executeMojo(
MojoExecutor.plugin(
MojoExecutor.groupId(ORG_APACHE_MAVEN_PLUGINS),
Expand Down

0 comments on commit 629fe4f

Please sign in to comment.