Can you open a JIRA plz? This way we don't lose this in the emails.
2009/3/16 Libor Nenadál <libor.nenadal(a)gmail.com>
The problem with BigDecimal is this:
(new BigDecimal("43.0")).equals(new BigDecimal("43")) is evaluated to
(new BigDecimal("43.0")).compareTo(new BigDecimal("43")) is evaluated
=> they are equal
Note that you should use String in constructor instead of double otherwise
you get something unpredictable - see
And because your evaluator uses equals, it is quite unusable. Is it
to do some special wrapper for this type? Just for equality, other
operations would be nice to look like "x * y" but with division you need to
specify scale and therefore I think it is not possible to wrap it to some
nice look. :-(
Edson Tirelli-3 wrote:
> It sounds like a bug. Can you get Drools source code and look at the
> test for this to make sure your scenario works there? The file is:
> Method is:
> Very easy to add your use case in there.
> Let us know what you find.
View this message in context:
Sent from the drools - user mailing list archive at Nabble.com
rules-users mailing list
JBoss Drools Core Development
JBoss, a division of Red Hat @