Bug 974364 - Inaccurate comparison because of String to Double coercion
Summary: Inaccurate comparison because of String to Double coercion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 5.x.x
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER2
: 6.0.0
Assignee: Mario Fusco
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-14 05:31 UTC by Toshiya Kobayashi
Modified: 2018-12-02 16:54 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-167 0 Major Resolved Inaccurate comparison because of String to Double coercion 2016-05-31 15:01:27 UTC

Description Toshiya Kobayashi 2013-06-14 05:31:40 UTC
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 05:41:41 UTC
Toshiya Kobayashi <tkobayas> 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 10:23:41 UTC
Mario Fusco <mario.fusco> updated the status of jira DROOLS-167 to Resolved

Comment 3 JBoss JIRA Server 2013-06-17 10:23:41 UTC
Mario Fusco <mario.fusco> made a comment on jira DROOLS-167

Fixed with mvel 2.1.6

Comment 4 Mario Fusco 2013-07-25 15:21:49 UTC
Fixed.

Comment 5 Marek Winkler 2013-09-02 09:13:23 UTC
Verified on BRMS 6.0.0-ER2.


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