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 2021/09/05 08:38:44 UTC

[maven-war-plugin] branch master updated: [MWAR-439] protect against unexpected null value

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-war-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new d78d6b5  [MWAR-439] protect against unexpected null value
d78d6b5 is described below

commit d78d6b563b7eb3b2f16b042eb3492e220ce83b26
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sun Sep 5 10:38:41 2021 +0200

    [MWAR-439] protect against unexpected null value
---
 src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java b/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
index d0be97a..dc1ecb3 100644
--- a/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
+++ b/src/main/java/org/apache/maven/plugins/war/AbstractWarMojo.java
@@ -646,6 +646,12 @@ public abstract class AbstractWarMojo
                 getLog().info( "Can't detect outdated resources when running inplace goal" );
                 outdatedResources = Collections.emptyList();
             }
+            else if ( session.getStartTime() == null )
+            {
+                // MWAR-439: this should never happen, but has happened in some integration context...
+                getLog().warn( "Can't detect outdated resources because unexpected session.getStartTime() == null" );
+                outdatedResources = Collections.emptyList();
+            }
             else
             {
                 outdatedResources = new ArrayList<>();