public ValidationException[] apply(Message msg) { try { Object subject = testExpression.evaluate(msg); boolean passed = getPredicate().evaluate(subject); return passed ? passed() : failedWithValue(subject, testExpression.getLocation(msg)); } catch (Exception e) { return failed(e); } }
public ValidationException[] apply(Message msg) { try { Object subject = testExpression.evaluate(msg); boolean passed = getPredicate().evaluate(subject); return passed ? passed() : failedWithValue(subject, testExpression.getLocation(msg)); } catch (Exception e) { return failed(e); } }