in src/main/java/org/apache/bsf/engines/jexl/JEXLEngine.java [157:178]
public Object eval(final String fileName, final int lineNo, final int colNo, final Object expr) throws BSFException {
if (expr == null) {
return null;
}
final JexlInfo info = new JexlInfo(
fileName != null ? fileName : expr.toString(),
Math.max(lineNo, 1),
Math.max(colNo, 1));
try {
JexlExpression jExpr;
if (expr instanceof File) {
jExpr = engine.createExpression(info, readSource(info, (File) expr));
} else if (expr instanceof URL) {
jExpr = engine.createExpression(info, readSource(info, (URL) expr));
} else {
jExpr = engine.createExpression(info, (String) expr);
}
return jExpr.evaluate(jc);
} catch (final Exception e) {
throw new BSFException(BSFException.REASON_EXECUTION_ERROR, "Exception from Commons JEXL:\n" + e.getMessage(), e);
}
}