You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/09 17:24:07 UTC

[maven-shared-incremental] 10/44: npe free

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

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-shared-incremental.git

commit b9f5d08f4a5bac58b823589678538d981c4d73b8
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Mon Nov 26 23:13:14 2012 +0000

    npe free
    
    git-svn-id: https://svn.apache.org/repos/asf/maven/shared/trunk@1413920 13f79535-47bb-0310-9956-ffa450edef68
---
 .../apache/maven/shared/incremental/IncrementalBuildHelper.java    | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java b/src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java
index 66799a5..8904201 100644
--- a/src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java
+++ b/src/main/java/org/apache/maven/shared/incremental/IncrementalBuildHelper.java
@@ -43,6 +43,8 @@ public class IncrementalBuildHelper
     public static final String CREATED_FILES_LST_FILENAME = "createdFiles.lst";
     private static final String INPUT_FILES_LST_FILENAME = "inputFiles.lst";
 
+    private static final String[] EMPTY_ARRAY = new String[0];
+
     /**
      * Needed for storing the status for the incremental build support.
      */
@@ -355,7 +357,10 @@ public class IncrementalBuildHelper
 
     private String[] toArrayOfPath( Set<File> files )
     {
-
+        if (files == null || files.isEmpty())
+        {
+            return EMPTY_ARRAY;
+        }
         String[] paths = new String[files.size()];
 
         int i = 0;

-- 
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.