[MNG-6819] Fix NullPointerException in StringVisitorModelInterpolator

Closes #301
This commit is contained in:
碎镜 2019-12-13 20:07:20 +08:00 committed by Michael Osipov
parent 3645593bfa
commit 2f144dec13
2 changed files with 3 additions and 3 deletions

View File

@ -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
{ {

View File

@ -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 );
} }