[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-736) Should be able to compare different numeric types
Edson Tirelli (JIRA)
jira-events at lists.jboss.org
Wed Mar 14 14:52:42 EDT 2007
[ http://jira.jboss.com/jira/browse/JBRULES-736?page=all ]
Edson Tirelli resolved JBRULES-736.
-----------------------------------
Fix Version/s: 3.1-m2
(was: 3.1-m3)
Resolution: Done
Assignee: Edson Tirelli (was: Mark Proctor)
Fixed. Now, numeric comparisons can be made accross different number classes and also with primitives in a transparent way.
> 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
More information about the jboss-jira
mailing list