Trimming MVEL scripts before compiling them.

This bypasses an issue with MVEL error handling why can go into an infinite loop in some edge cases. More info here: http://jira.codehaus.org/browse/MVEL-292

Closes #3168
This commit is contained in:
Boaz Leskes 2013-06-19 12:11:15 +02:00
parent fccbe9c185
commit 02c6222320
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class MvelScriptEngineService extends AbstractComponent implements Script
@Override
public Object compile(String script) {
return MVEL.compileExpression(script, new ParserContext(parserConfiguration));
return MVEL.compileExpression(script.trim(), new ParserContext(parserConfiguration));
}
@Override