[rules-users] Can get "not equal" (!=) to work but not "equal" (==) in LHS

rjr201 rich.j.riley at gmail.com
Tue Feb 5 12:11:40 EST 2013


It may be because in Java you have to compare strings using .equals("");

So in your case it would be: 

ruleFlowId.equals("test") == true

It's because Strings are objects, and ==  tests to see if the String is
literally the same object as the other String, not just a String with the
same value. != works because they aren't the same object.

Hope that works,
Rich. 



--
View this message in context: http://drools.46999.n3.nabble.com/Can-get-not-equal-to-work-but-not-equal-in-LHS-tp4022074p4022076.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list