Bug 974364 - Inaccurate comparison because of String to Double coercion
Inaccurate comparison because of String to Double coercion
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
5.x.x
Unspecified Unspecified
unspecified Severity medium
: ER2
: 6.0.0
Assigned To: Mario Fusco
Marek Winkler
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-14 01:31 EDT by Toshiya Kobayashi
Modified: 2014-08-06 16:19 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:19:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-167 Major Resolved Inaccurate comparison because of String to Double coercion 2016-05-31 11:01 EDT

  None (edit)
Description Toshiya Kobayashi 2013-06-14 01:31:40 EDT
Description of problem:

Platform BZ for https://issues.jboss.org/browse/DROOLS-167

Steps to Reproduce:

import org.drools.compiler.Person;
rule R1
  when
    $p : Person( name < "90201304122000000000000017" )
  then
end

ksession.insert( new Person( "90201304122000000000000015", 38 ) );

Actual results:

The rule is not fired

Expected results:

The rule is fired
Comment 1 JBoss JIRA Server 2013-06-14 01:41:41 EDT
Toshiya Kobayashi <tkobayas@redhat.com> made a comment on jira DROOLS-167

Sent a pull request for a test case.

https://github.com/droolsjbpm/drools/pull/215

Probably it should be converted to BigDecimal or just compared as String.
Comment 2 JBoss JIRA Server 2013-06-17 06:23:41 EDT
Mario Fusco <mario.fusco@gmail.com> updated the status of jira DROOLS-167 to Resolved
Comment 3 JBoss JIRA Server 2013-06-17 06:23:41 EDT
Mario Fusco <mario.fusco@gmail.com> made a comment on jira DROOLS-167

Fixed with mvel 2.1.6
Comment 4 Mario Fusco 2013-07-25 11:21:49 EDT
Fixed.
Comment 5 Marek Winkler 2013-09-02 05:13:23 EDT
Verified on BRMS 6.0.0-ER2.

Note You need to log in before you can comment on or make changes to this bug.