commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <ortwin.glu...@nose.ch>
Subject Re: cvs commit: jakarta-commons/httpclient/src/java/org/apache/commons/httpclient HttpMethodBase.java HttpClient.java
Date Mon, 24 Feb 2003 18:40:54 GMT
mbecke@apache.org wrote:
>   +        } catch (IOException e) {
>   +            connection.releaseConnection();
>   +            throw e;
>   +        } catch (RuntimeException e) {
>   +            connection.releaseConnection();
>   +            throw e;
>            }

I suggest using a finally clause instead of the above construct. It's no 
good catching a RuntimeException (you may easily overlook a NPE that 
stems from a programming error). See [1] for details.

[1] http://www.javaworld.com/javaworld/javatips/jw-javatip134.html


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message