[jboss-jira] [JBoss JIRA] (JBRULES-3302) Unwanted type coersion of String to float values when using "in" keyword LHS

Troy Parrish (Created) (JIRA) jira-events at lists.jboss.org
Wed Nov 30 12:55:41 EST 2011


Unwanted type coersion of String to float values when using "in" keyword LHS
----------------------------------------------------------------------------

                 Key: JBRULES-3302
                 URL: https://issues.jboss.org/browse/JBRULES-3302
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: drools-compiler (expert)
    Affects Versions: 5.3.0.Final, 5.2.0.Final
         Environment: Windows 7, Rational Application Developer 7.5, Eclipse Helios Service Release 2
            Reporter: Troy Parrish
            Assignee: Mark Proctor


String values get treated as float values even when fact declares the property as a String when using the "in" keyword to evaluate a String value against a set of values in the lhs of the rule.

Example:

input into session : "10.5"

will match against all of the following values "10.5", "10.50", "10.500" etc when in this format:

when
     Fact(string in ("11.5", "10.50", "11.500"))
then

This problem behavior occurs in 5.3.0Final, 5.2.0.Final but not in 5.1.0Final, this is when Expert went from using mvel 2.0.16 to mvel 2.1.0


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list