Hi, All: My drl file is like below: package org.drools.examples; import org.drools.examples.HelloWorldExample.Message;
rule "check deep int"
dialect "java"
when
m:Message( sec.fir.d == "99.9" )
then
System.out.println( "===check deep double ok===" );
end
I find that "==" operator does not work well on double and float type.
This condition can not be satisfied. If I change the condition to sec.fir.d
< "100" or sec.fir.d > "99.8", it works well. Is it a bug?
I attach my test code. And I add below jars into classpath:
antlr-runtime-3.0.jar
core-3.2.3.v_686_R32x.jar
drools-compiler-4.0.7.jar
drools-core-4.0.7.jar
drools-decisiontables-4.0.7.jar
drools-jsr94-4.0.7.jar
janino-2.5.10.jar
jsr94-1.1.jar
mvel-1.3.12-java1.5.0.jar
Can anyone kindly help me?
Thanks!
- Zeke
HelloWorldExample.java
Description: Binary data
test.drl
Description: Binary data
_______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
