[rules-users] shadow proxy nullpointerexception
Edson Tirelli
tirelli at post.com
Tue Dec 9 10:55:36 EST 2008
Assuming your "computesomething" method has a signature like:
public boolean computesomething() { .. }
The shadow proxy will delegate the call to your instance method. So, does
not matter if the shadow proxy innerObj is null (since being a lazy proxy it
may not have been loaded yet) because the shadow proxy will actually execute
your instance computesomething() method.
Stack trace?
[]s
Edson
2008/12/9 Trägenap <traegenap at ttc-informatik.de>
> Hello,
>
> I got some problems with shadowproxy.
>
> I have a couple of instances of class "FirstObj". The objects contains some
> other objects like "innerObj" and have a method "computesomething", which
> returns boolean and use the "innerObj" to compute the result.
>
> I try to access this object with the following rule:
>
> rule "doIt"
> when
> $firstobj : FirstObj(computesomething == true)
> then
> // take a break...
> System.out.println("be happy");
>
> I debug the programm and figure out that the innerObj is not null. Instead
> of my original object "firstobj", there I found a FirstObjShadowProxy which
> offers a field called "innerObj" which is null.
>
> Isnt it possible to get access to "computed" fields? What is wrong here?
>
> Thanks
> Thorsten
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20081209/e1f813d8/attachment.html
More information about the rules-users
mailing list