Inaccurate String comparison in BRMS

Solution Unverified - Updated -

Issue

  • If a rule compares String fields which consist of many digits, it may be wrongly evaluated.

For example, the following test doesn't fire the rule

import org.drools.compiler.Person;
rule R1
  when
    $p : Person( name < "90201304122000000000000017" )
  then
end
ksession.insert( new Person( "90201304122000000000000015", 38 ) );

Environment

  • Red Hat JBoss BRMS
    • 5.3.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.