1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-02 00:15:02 -04: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 {
// 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);
}