Hej Andrew,

> -----Original Message-----
> From: Andrew Geery [mailto:[EMAIL PROTECTED]

> If the reference exists, everything works perfectly: I can 
> dereference 
> like this
> person.getLegalName().getFirstName()

[..]

> My questions are:
> 1) Should this method be changed to return a default value 
> based on the 
> return type of the method being invoked, in the case where subject is 
> null (e.g., null for an object, 0 for an int, false for a boolean, 
> etc.)? Or at the very least, return null in all cases if 
> subject is null?

> 2) How can I check whether a proxy reference is null? Is 
> there a way to do this transparently?

You may use the ProxyHelper class to materialize the proxy.
However, this defeats the purpose of proxies because
it is not transparent.

> I've read other messages in the archive about this issue, but 
> I haven't really seen a solution to it. The solution proposed 
> here didn't seem to do anything for me: 
> http://www.mail-archive.com/[EMAIL PROTECTED]/msg00132.html

I do not understand that.  I had the same problem and that
tip helped me.

Can you assemble a junit test or small test case 
that reveals the problem? 

Olli




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to