commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phil Steitz <phil.ste...@gmail.com>
Subject Re: [DBCP] DelegatingDatabaseMetaData returns null for @NonNull methods
Date Mon, 23 Nov 2009 16:31:22 GMT
Mark Thomas wrote:
> sebb wrote:
>> Findbugs has lots of complaints that the DelegatingDatabaseMetaData
>> class methods may return null for methods which should be @NonNull.
>>
>> These are all of the form:
>>
>>     public String getSchemaTerm() throws SQLException {
>>         { try { return _meta.getSchemaTerm(); }
>>         catch (SQLException e) { handleException(e); return null; } }
>>     }
>>
>> Now the handleException() method never returns, it always throws an
>> exception, so the return statement cannot be reached.
>>
>> Seems to me it would be clearer to replace the return statements with
>> an assertion exception.
>>
>> WDYT?
> 
> +1
> 
> Mark

+1

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


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


Mime
View raw message