You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2020/11/09 13:16:46 UTC

[sling-feature-converter-maven-plugin] branch master updated: SLING-9885 prevent NPE in case artifact is not (yet) attached

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-feature-converter-maven-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new 5e505d8  SLING-9885 prevent NPE in case artifact is not (yet) attached
5e505d8 is described below

commit 5e505d8340af78fa28d81a14609fe8d3d642743c
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Mon Nov 9 14:15:18 2020 +0100

    SLING-9885 prevent NPE in case artifact is not (yet) attached
---
 .../java/org/apache/sling/cpconverter/maven/mojos/ConvertCPMojo.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/cpconverter/maven/mojos/ConvertCPMojo.java b/src/main/java/org/apache/sling/cpconverter/maven/mojos/ConvertCPMojo.java
index 93a35a7..9570ecb 100644
--- a/src/main/java/org/apache/sling/cpconverter/maven/mojos/ConvertCPMojo.java
+++ b/src/main/java/org/apache/sling/cpconverter/maven/mojos/ConvertCPMojo.java
@@ -268,7 +268,7 @@ public class ConvertCPMojo
                     for (final Artifact artifact : artifacts) {
                         final File source = artifact.getFile();
                         getLog().info("Artifact: '" + artifact + "', source file: '" + source + "'");
-                        if (source.exists() && source.isFile() && source.canRead()) {
+                        if (source != null && source.exists() && source.isFile() && source.canRead()) {
                             converter.convert(source);
                             Artifact convertedPackage = new DefaultArtifact(
                                 artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(),