1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-01-11 05:48:01 -05:00

Let Groovy deal with Java keywords like null, case, etc

This commit is contained in:
Reinhard Pointner 2016-10-01 01:49:24 +08:00
parent a589cb1dcd
commit 527cd91a0d

View File

@ -246,7 +246,7 @@ public class ExpressionFormat extends Format {
protected static synchronized CompiledScript compileScriptlet(String expression) throws ScriptException { protected static synchronized CompiledScript compileScriptlet(String expression) throws ScriptException {
// simple expressions like {n} don't need to be interpreted by the script engine // simple expressions like {n} don't need to be interpreted by the script engine
if (SourceVersion.isIdentifier(expression)) { if (SourceVersion.isIdentifier(expression) && !SourceVersion.isKeyword(expression)) {
return new Variable(expression); return new Variable(expression);
} }