Hi everyone,
I've tried to go from Drools 5.3.0.Final to 5.4.0.Final and some strange
errors appeared on constraints using the size of a list.
For instance, given the following object:
public class MyObject {
private List<String> param = new ArrayList<String>();
public MyObject() {
super();
}
public List<String> getParam() {
return param;
}
public void setParam(List<String> param) {
this.param = param;
}
}
This rule:
rule "Sample rule"
when
MyObject( param.size > 0 )
then
System.out.println( "Sample rule activated" );
end
Provokes the following error:
Unable to Analyse Expression param.size > 0:
[Error: Comparison operation requires compatible types. Found class
java.lang.String and class java.lang.Integer]
[Near : {... param.size > 0 ....}]
^ : [Rule name='Sample rule']
This worked very well in Drools 5.3.0.Final.
Is there some configuration specific to Drools 5.4.0.Final that I've missed
in the release notes?
Thanks in advance for your help.
Best,
Alexis
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users