JEXL update
-- Update to 2.1.1 from 2.0 -- VariantFiltrationWalker now allows you to run with type unsafe selects, which all default to false when matching. So "AF < 0.5" works even in the presence of multi-allelics now. --
This commit is contained in:
parent
24dd8ee51b
commit
31ee8aa01a
2
ivy.xml
2
ivy.xml
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
<!-- Commons Dependencies -->
|
||||
<dependency org="org.apache.commons" name="commons-email" rev="1.2"/>
|
||||
<dependency org="org.apache.commons" name="commons-jexl" rev="2.0"/>
|
||||
<dependency org="org.apache.commons" name="commons-jexl" rev="2.1.1"/>
|
||||
<dependency org="commons-lang" name="commons-lang" rev="2.5"/>
|
||||
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
|
||||
<dependency org="commons-io" name="commons-io" rev="2.1"/>
|
||||
|
|
|
|||
|
|
@ -52,8 +52,9 @@ public class VariantContextUtils {
|
|||
private final static boolean ASSUME_MISSING_FIELDS_ARE_STRINGS = false;
|
||||
|
||||
static {
|
||||
engine.setSilent(false); // will throw errors now for selects that don't evaluate properly
|
||||
engine.setLenient(false);
|
||||
engine.setSilent(true); // will throw errors now for selects that don't evaluate properly
|
||||
engine.setLenient(true);
|
||||
engine.setDebug(false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -264,7 +264,9 @@ class JEXLMap implements Map<VariantContextUtils.JexlVCMatchExp, Boolean> {
|
|||
// if the context is null, we need to create it to evaluate the JEXL expression
|
||||
if (this.jContext == null) createContext();
|
||||
try {
|
||||
jexl.put (exp, (Boolean) exp.exp.evaluate(jContext));
|
||||
final Boolean value = (Boolean) exp.exp.evaluate(jContext);
|
||||
// treat errors as no match
|
||||
jexl.put(exp, value == null ? false : value);
|
||||
} catch (Exception e) {
|
||||
throw new UserException.CommandLineException(String.format("Invalid JEXL expression detected for %s with message %s", exp.name, e.getMessage()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue