protected boolean evaluateCondition ( String script , Log log ) throws EnforcerRuleException { Boolean evaluation = Boolean . FALSE ; try { evaluation = ( Boolean ) bsh . eval ( script ) ; log . debug ( "Echo evaluating : " + evaluation ) ; } catch ( EvalError ex ) { throw new EnforcerRuleException ( "Couldn't evaluate condition: " + script , ex ) ; } return evaluation . booleanValue ( ) ; }
Evaluate expression using Beanshell .