You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by he...@apache.org on 2016/07/13 13:20:10 UTC
svn commit: r1752426 -
/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
Author: henrib
Date: Wed Jul 13 13:20:10 2016
New Revision: 1752426
URL: http://svn.apache.org/viewvc?rev=1752426&view=rev
Log:
JEXL:
JEXL-205 / JEXL-206 - dont interpret cancelled scripts
Modified:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java?rev=1752426&r1=1752425&r2=1752426&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl3/internal/Interpreter.java Wed Jul 13 13:20:10 2016
@@ -192,6 +192,9 @@ public class Interpreter extends ParserV
public Object interpret(JexlNode node) {
JexlContext.ThreadLocal local = null;
try {
+ if (isCancelled()) {
+ throw new JexlException.Cancel(node);
+ }
if (context instanceof JexlContext.ThreadLocal) {
local = jexl.putThreadLocal((JexlContext.ThreadLocal) context);
}
@@ -295,7 +298,7 @@ public class Interpreter extends ParserV
}
return jexl.cancellable;
}
-
+
/**
* Finds the node causing a NPE for diadic operators.
* @param xrt the RuntimeException