Skip to content

Commit

Permalink
NPE returned during javascript evaluation for interactivity
Browse files Browse the repository at this point in the history
actions. Fixed by replacing null value with string null.
  • Loading branch information
yulin.wang authored and zhiqiangqian committed Jul 22, 2014
1 parent 93c5b97 commit c1fd797
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -510,6 +510,10 @@ protected String evaluateExpression( String script )
{
evaluateResult = "\"" + evaluateResult + "\""; //$NON-NLS-1$//$NON-NLS-2$
}
else if ( evaluateResult == null )
{
evaluateResult = "null"; //$NON-NLS-1$
}

script = Pattern.compile( expression, Pattern.LITERAL )
.matcher( script )
Expand All @@ -528,6 +532,10 @@ protected String evaluateExpression( String script )
{
evaluateResult = "\"" + evaluateResult + "\""; //$NON-NLS-1$//$NON-NLS-2$
}
else if ( evaluateResult == null )
{
evaluateResult = "null"; //$NON-NLS-1$
}

script = Pattern.compile( expression, Pattern.LITERAL )
.matcher( script )
Expand Down

0 comments on commit c1fd797

Please sign in to comment.