Hi Wolfgang,
I came across this (or very similar) recently. I think the issue is the bean-style naming
convention. The convention is (apparently):
boolean => isSomething()
Boolean => getSomething()
… which means that Boolean properties are not so readable as boolean.
Worth giving it a quick try on one of your classes.
Steve
On 22 Mar 2013, at 16:01, Wolfgang Laun <wolfgang.laun(a)gmail.com> wrote:
Here I have lots of classes with Boolean methods such as
Boolean isSomething()
and a large number of rules where
X(... something == true,...)
used to work fine not too long ago. But 5.5.0 and 5.4.0 claim that
this isn't correct:
Unable to Analyse Expression adult == true:
[Error: unable to resolve method using strict-mode: express.Person.adult()]
[Near : {... adult == true ....}]
This used to work in 5.3.0.
Trying to avoid the Boolean/bool discrepancy, I replaced true with the object:
X(... something == Boolean.TRUE,...)
but being as strict as possible doesn't work, too, neither in 5.4.0nor 5.5.0.
This used to work in 5.3.0, and so did the very simple
X(... something,...)
but not any more.
The fact that all of the following work in 5.5.0
X(... isSomething(),... )
X(... isSomething() == true,... )
X(... isSomething() == Boolean.TRUE,... )
is certainly nice, but:
Since I'm going to have to change a ton of rules: Which of these
versions should I use to have best chances for future compatibility?
Thanks
-W
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users