From 527cd91a0d3ec1f55c6c72c2450d60c1241bc4f9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sat, 1 Oct 2016 01:49:24 +0800 Subject: [PATCH] Let Groovy deal with Java keywords like null, case, etc --- source/net/filebot/format/ExpressionFormat.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/net/filebot/format/ExpressionFormat.java b/source/net/filebot/format/ExpressionFormat.java index db36ce32..0c3dfb7c 100644 --- a/source/net/filebot/format/ExpressionFormat.java +++ b/source/net/filebot/format/ExpressionFormat.java @@ -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); }