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.