[rules-dev] Another MVEL puzzle

Wolfgang Laun wolfgang.laun at gmail.com
Thu Jun 23 11:55:07 EDT 2011


rule x
when
   # ... bind 2 int and 2 long, making sure that
   # $int1 == 1 and $int3 == 65536...

   eval( $int1 == $long2 == $int3 == $long4 )
then
   // print all 4 values
end

Using dialect "java" this results in a syntax error, which is to be
expected.

Dialect "mvel" evaluates this to true for a surprising range of integer
values.
Here is a selection:

 1 1 65536 1234567890
 1 1 65536 424242
 1 1 65536 65536
 1 1 65536 4294967296
 1 1 65536 65568
 1 1 65536 65552

Is there any logic behind this?

-W
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20110623/c9b34576/attachment.html 


More information about the rules-dev mailing list