directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Is this Exception catch really wanted?
Date Sat, 15 May 2010 08:34:46 GMT
On 5/15/10 10:15 AM, Stefan Seelmann wrote:
> Let's add a comment into each empty catch block to describe why the
> exception is catched and not handled so another developer can see the
> reason.

I'm just wondering if the method signature is correct ? Why would we 
throw an exception in the setSession() method ? Either the session is 
null, and we should throw an IllegalArgumentException, or we should not 
throw anything.

IMHO, the setSession() should not throw anything. In all case, the 
concern Felix raised is interesting and should lead to some thoughts 
about the cause of the concern, instead of shutting it down by adding 
some log or some @suppressWarning, don't you think so ?

Emmanuel L├ęcharny

View raw message