[jboss-jira] [JBoss JIRA] (DROOLS-94) Hashed field on Integer.this causes a RuntimeException

Mario Fusco (JIRA) jira-events at lists.jboss.org
Tue Apr 2 12:28:42 EDT 2013


Mario Fusco created DROOLS-94:
---------------------------------

             Summary: Hashed field on Integer.this causes a RuntimeException
                 Key: DROOLS-94
                 URL: https://issues.jboss.org/browse/DROOLS-94
             Project: Drools
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Mario Fusco
            Assignee: Mario Fusco


Having the following drl

{code}
global java.util.List list;
rule R when
 $i : Integer( this == 1 )
then
 list.add( $i );
end
rule S when
 $i : Integer( this == 2 )
then
 list.add( $i );
end
rule T when
 $i : Integer( this == 3 )
then
 list.add( $i );
end
{code}

and inserting an Integer(1) in the ksession causes the following Exception:

org.drools.core.RuntimeDroolsException: Conversion to long not supported from java.lang.Integer
        at org.drools.core.base.extractors.BaseObjectClassFieldReader.getLongValue(BaseObjectClassFieldReader.java:126)

Note that it is necessary to have the constraint on Integer.this in 3 different rule in order to enable the field hashing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list