From 5fae8c31b485edc38f6c98c423d775a08e7541ba Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Fri, 7 Apr 2023 14:21:09 +0300 Subject: [PATCH] Avoid null pointer exception when building containers ArtifactResultBuildItem#path is set to `null` for Artifact results of type `native-container` and `jar-container` Follow up to #31166 Closes #32418 --- .../main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java index 25054b8134b043..00a31cffb9a936 100644 --- a/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java +++ b/devtools/gradle/gradle-application-plugin/src/main/java/io/quarkus/gradle/tasks/worker/BuildWorker.java @@ -59,7 +59,7 @@ public void execute() { LOGGER.warn("AugmentResult.results = null"); } else { LOGGER.info("AugmentResult.results = {}", results.stream().map(ArtifactResult::getPath) - .map(Object::toString).collect(Collectors.joining("\n ", "\n ", ""))); + .map(r -> r == null ? "null" : r.toString()).collect(Collectors.joining("\n ", "\n ", ""))); } JarResult jar = result.getJar(); LOGGER.info("AugmentResult:");