[
https://issues.jboss.org/browse/JBRULES-3129?page=com.atlassian.jira.plug...
]
Mario Fusco resolved JBRULES-3129.
----------------------------------
Resolution: Rejected
Drools 5.2 is more strict when deriving type information. In particular all collection are
now type-safe by default. It means that the items in the list are actually treated as
java.lang.Objects that of course don't have a property named 'a'.
If necessary it is possible to relax this constraint by adding the annotation
@typesafe(false) on the ListOfThree declaration.
Regression: Evaluator '==' does not support 'null'
any more
-----------------------------------------------------------
Key: JBRULES-3129
URL:
https://issues.jboss.org/browse/JBRULES-3129
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.Final
Reporter: Wolfgang Laun
Assignee: Mario Fusco
Fix For: 5.2.1.Final
The DRL file given below causes these error messages (although it compiled and executed
correctly in 5.1.1).
=============================================================
Evaluator '==' does not support type 'null : [Rule name='rule1']
[DialectError message='Unable to wire compiled classes, probably related to
compilation failures:[Error: unable to resolve method using strict-mode:
java.lang.Object.a()]
[Near : {... list[0].a ....}]
^
[Line: 1, Column: 9]']
=============================================================
import java.util.List
declare Three
a : String
b : String
c : String
end
declare ListOfThree
list : List
clazz : Class
end
rule 'rule1'
when
ListOfThree( list.size > 0 && list[0].a == null, $c: clazz );
then
System.out.println( "rule1 " + $c.getSimpleName() );
end
--
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