}
// attempt to reuse last executor cached in volatile JexlNode.value
if (node != null && cache) {
Object cached = node.jjtGetValue();
if (cached instanceof JexlPropertySet) {
JexlPropertySet setter = (JexlPropertySet) cached;
Object eval = setter.tryInvoke(object, attribute, value);
if (!setter.tryFailed(eval)) {
return;
}
}
}
JexlException xjexl = null;
JexlPropertySet vs = uberspect.getPropertySet(object, attribute, value, node);
// if we can't find an exact match, narrow the value argument and try again
if (vs == null) {
// replace all numbers with the smallest type that will fit
Object[] narrow = {value};
if (arithmetic.narrowArguments(narrow)) {
vs = uberspect.getPropertySet(object, attribute, narrow[0], node);
}
}
if (vs != null) {
try {
// cache executor in volatile JexlNode.value
vs.invoke(object, value);
if (node != null && cache && vs.isCacheable()) {
node.jjtSetValue(vs);
}
return;
} catch (RuntimeException xrt) {
if (node == null) {