[
http://jira.jboss.com/jira/browse/JBRULES-736?page=comments#action_12356130 ]
Edson Tirelli commented on JBRULES-736:
---------------------------------------
Thanks for reporting and plz let me know if you face any other problem.
Should be able to compare different numeric types
-------------------------------------------------
Key: JBRULES-736
URL:
http://jira.jboss.com/jira/browse/JBRULES-736
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Reteoo
Affects Versions: 3.1-m1
Reporter: Michael Neale
Assigned To: Edson Tirelli
Priority: Blocker
Fix For: 3.1-m2
Attachments: numberguess.zip
rule High
when
RandomNumber(randomValue:value)
Guess(guess: value>randomValue)
game: GameHistory()
then
game.setBiggest(guess.intValue()-1);
end
will cause:
Caused by: java.lang.ClassCastException: java.lang.Long
at java.lang.Integer.compareTo(Integer.java:35)
at
org.drools.base.evaluators.ObjectFactory$ObjectGreaterEvaluator.evaluateCachedRight(ObjectFactory.java:304)
at
org.drools.rule.VariableRestriction.isAllowedCachedRight(VariableRestriction.java:74)
at
org.drools.rule.VariableConstraint.isAllowedCachedRight(VariableConstraint.java:78)
at
org.drools.common.SingleBetaConstraints.isAllowedCachedRight(SingleBetaConstraints.java:111)
This used to work in 3.0.5, so something is seriously broken in the evaluators.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira