[rules-users] ConsequenceException when using modify

Wolfgang Laun wolfgang.laun at gmail.com
Thu Feb 16 11:04:30 EST 2012


A pattern like this
   MyObject(variable1 == defaultValue)
is bound to cause a NPE if an object with variable1 == null is inserted.

Having a rule that sets variable1 with a higher priority isn't averting this.

I just wonder why the NPE occurs during the execution of "First rule:
default"; it should occur during a MyObject insert.

-W

On 16/02/2012, Vakimshaar <jean.logeart at gmail.com> wrote:
> The initial value is null
>
> The setter is a regular one, it really does set the variable1 which is
> actually a "String".
>
> defaultValue comes from a global variable. It is a String that can be
> correctly printed when the value is set...
>
> I really don't understand what is wrong here :s !
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/ConsequenceException-when-using-modify-tp3750604p3750683.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list