[
https://issues.jboss.org/browse/DROOLS-94?page=com.atlassian.jira.plugin....
]
Mario Fusco resolved DROOLS-94.
-------------------------------
Fix Version/s: 5.6
6.0.0.Beta1
Resolution: Done
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
Fix For: 5.6, 6.0.0.Beta1
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