commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
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.

WDYT?

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


Mime
View raw message