Hi Oliver,

think there is no need to log this exception,
re-throw it will be enough.
I could kick out the log statement if this
solve your problem?

regards,
Armin

----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 10, 2003 11:47 AM
Subject: RE: How to use Proxies, was: Re: Null References and Proxies


> Hello,
> 
> > I am still wondering how to use proxies appropriately.
> > Someone else must have done this before.
> 
> I seem to be the only one interested in this,
> but nevertheless I would like to say that I found 
> another problem.  see below.
> 
> > 
> > > -----Original Message-----
> 
> > > >In short: Is is intended that a null-reference
> > > >is wrapped by a proxy?
> 
> > Suppose I want to output a.b.getMsg() 
> > if and only if a.b != null.
> > 
> > If b is not proxied, I simply write
> > 
> > if (a.b!=null)
> > System.out.println(a.b.getMsg())
> > 
> > If b is proxied, however, the above will throw
> > a NullPointerException.  So, what's the solution?
> > (An unacceptable solution would be to allow that exception
> > to be thrown and then catch and ignore it.)
> 
> That solution (catching the NullPointerException) 
> does not work nicely, either, because the 
> IndirectionHandler logs the stackdump as an error
> before it re-throws it.
> 
> Why?
> 
> Olli
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


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

Reply via email to