Class JexlArithmetic.InterruptibleCharSequence

java.lang.Object
org.apache.commons.jexl3.JexlArithmetic.InterruptibleCharSequence
All Implemented Interfaces:
CharSequence
Enclosing class:
JexlArithmetic

private static final class JexlArithmetic.InterruptibleCharSequence extends Object implements CharSequence
A CharSequence wrapper that throws ArithmeticException if the current thread is interrupted. Used as the input to Pattern.matcher() so that catastrophic-backtracking regex matches remain responsive to JEXL cancellation (which sets the thread interrupt flag). The interrupt flag is checked every 256 charAt calls to limit overhead.