[rules-users] java.lang.NullPointerException at org.drools.rule.PredicateConstraint.isAllowed(PredicateConstraint.java:291)
Vincent LEGENDRE
vincent.legendre at eurodecision.com
Tue Jun 19 18:15:10 EDT 2012
> You could probably also consider simplifying the rule structure... many - if
> not all - the evals and explicit getters seem unneeded.. that would make the
> rule more efficient and definitely more readable.
... and will potentially protect against null usage in operations, like the operation just before the condition you cite :
((lcki.getWS_RiskScore() - lcki.getWS_RiskScore())/lcki.getWS_RiskScore()) >= 4)
.. even if it reduce to false every time, using null there will raise a NPE ...
Did you check that your all the used fields are not null ?
More information about the rules-users
mailing list