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

slachiewicz pushed a commit to branch MNG-6819-2
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 8177d3d114ce21cbb3c9ff17e098183cf00f3956
Author: Sylwester Lachiewicz <slachiew...@apache.org>
AuthorDate: Sat May 23 01:30:47 2020 +0200

    [MNG-6819] Fix also NPE in StringSearchModelInterpolator
---
 .../maven/model/interpolation/StringSearchModelInterpolator.java      | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
 
b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
index af4d105..93e53b7 100644
--- 
a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
+++ 
b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/StringSearchModelInterpolator.java
@@ -365,7 +365,7 @@ public class StringSearchModelInterpolator
 
                 String interpolated = ctx.interpolate( value );
 
-                if ( !interpolated.equals( value ) )
+                if ( interpolated != null && !interpolated.equals( value ) )
                 {
                     field.set( target, interpolated );
                 }
@@ -459,7 +459,7 @@ public class StringSearchModelInterpolator
                     {
                         String interpolated = ctx.interpolate( (String) value 
);
 
-                        if ( !interpolated.equals( value ) )
+                        if ( interpolated != null && !interpolated.equals( 
value ) )
                         {
                             try
                             {

Reply via email to