mirror of
https://github.com/apache/maven.git
synced 2025-03-06 16:49:27 +00:00
[MNG-6819] Fix NullPointerException in StringVisitorModelInterpolator
Closes #301
This commit is contained in:
parent
3645593bfa
commit
2f144dec13
@ -369,7 +369,7 @@ void doInterpolate( Object target, InterpolateObjectAction ctx )
|
||||
|
||||
String interpolated = ctx.interpolate( value );
|
||||
|
||||
if ( !interpolated.equals( value ) )
|
||||
if ( interpolated != null && !interpolated.equals( value ) )
|
||||
{
|
||||
field.set( target, interpolated );
|
||||
}
|
||||
@ -463,7 +463,7 @@ void doInterpolate( Object target, InterpolateObjectAction ctx )
|
||||
{
|
||||
String interpolated = ctx.interpolate( (String) value );
|
||||
|
||||
if ( !interpolated.equals( value ) )
|
||||
if ( interpolated != null && !interpolated.equals( value ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -1424,7 +1424,7 @@ private void visit( Properties properties )
|
||||
{
|
||||
String value = (String) v;
|
||||
String inter = interpolate( value );
|
||||
if ( value != inter )
|
||||
if ( value != inter && inter != null )
|
||||
{
|
||||
entry.setValue( inter );
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user