commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Fabulich (JIRA)" <j...@apache.org>
Subject [jira] Created: (DBUTILS-64) FindBugs reportrs "bad practice" in QueryLoader
Date Sun, 08 Nov 2009 01:58:32 GMT
FindBugs reportrs "bad practice" in QueryLoader
-----------------------------------------------

                 Key: DBUTILS-64
                 URL: https://issues.apache.org/jira/browse/DBUTILS-64
             Project: Commons DbUtils
          Issue Type: Bug
    Affects Versions: 1.2, 1.1, 1.3
            Reporter: Dan Fabulich
            Priority: Minor


Usage of GetResource in org.apache.commons.dbutils.QueryLoader.loadQueries(String) may be
unsafe if class is extended
Line 97

http://findbugs.sourceforge.net/bugDescriptions.html#UI_INHERITANCE_UNSAFE_GETRESOURCE
UI: Usage of GetResource may be unsafe if class is extended (UI_INHERITANCE_UNSAFE_GETRESOURCE)

Calling this.getClass().getResource(...) could give results other than expected if this class
is extended by a class in another package.

To fix this, I think we'd need to change QueryLoader to allow you to specify the class for
relative path handling.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message