mirror of https://github.com/apache/maven.git
[MNG-6819] Fix NullPointerException in StringVisitorModelInterpolator
Closes #301
This commit is contained in:
parent
3645593bfa
commit
2f144dec13
|
@ -369,7 +369,7 @@ public class StringSearchModelInterpolator
|
||||||
|
|
||||||
String interpolated = ctx.interpolate( value );
|
String interpolated = ctx.interpolate( value );
|
||||||
|
|
||||||
if ( !interpolated.equals( value ) )
|
if ( interpolated != null && !interpolated.equals( value ) )
|
||||||
{
|
{
|
||||||
field.set( target, interpolated );
|
field.set( target, interpolated );
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ public class StringSearchModelInterpolator
|
||||||
{
|
{
|
||||||
String interpolated = ctx.interpolate( (String) value );
|
String interpolated = ctx.interpolate( (String) value );
|
||||||
|
|
||||||
if ( !interpolated.equals( value ) )
|
if ( interpolated != null && !interpolated.equals( value ) )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -1424,7 +1424,7 @@ public class StringVisitorModelInterpolator
|
||||||
{
|
{
|
||||||
String value = (String) v;
|
String value = (String) v;
|
||||||
String inter = interpolate( value );
|
String inter = interpolate( value );
|
||||||
if ( value != inter )
|
if ( value != inter && inter != null )
|
||||||
{
|
{
|
||||||
entry.setValue( inter );
|
entry.setValue( inter );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue