commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject [DBCP] DelegatingDatabaseMetaData returns null for @NonNull methods
Date Mon, 23 Nov 2009 16:03:55 GMT
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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message