openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r956705 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Date Mon, 21 Jun 2010 21:32:46 GMT
Author: dwoods
Date: Mon Jun 21 21:32:46 2010
New Revision: 956705

URL: http://svn.apache.org/viewvc?rev=956705&view=rev
Log:
OPENJPA-1700 FindBugs - Usage of GetResource may be unsafe if class is extended.  Use DBDictionary.class.getResourceAsStream()
like other places in the code.

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java?rev=956705&r1=956704&r2=956705&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/DBDictionary.java
Mon Jun 21 21:32:46 2010
@@ -4621,7 +4621,7 @@ public class DBDictionary
         // initialize the error codes
         SQLErrorCodeReader codeReader = new SQLErrorCodeReader();
         String rsrc = "sql-error-state-codes.xml";
-        InputStream stream = getClass().getResourceAsStream(rsrc);
+        InputStream stream = DBDictionary.class.getResourceAsStream(rsrc);
         String dictionaryClassName = getClass().getName();
         if (stream == null) { // User supplied dictionary but no error codes xml
             // use default



Mime
View raw message