commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1206285 - /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
Date Fri, 25 Nov 2011 19:15:50 GMT
Author: sebb
Date: Fri Nov 25 19:15:49 2011
New Revision: 1206285

URL: http://svn.apache.org/viewvc?rev=1206285&view=rev
Log:
Document why pmd cannot be null (Eclipse says potential NPE)

Modified:
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java?rev=1206285&r1=1206284&r2=1206285&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AbstractQueryRunner.java
Fri Nov 25 19:15:49 2011
@@ -194,6 +194,10 @@ public abstract class AbstractQueryRunne
                 int sqlType = Types.VARCHAR;
                 if (!pmdKnownBroken) {
                     try {
+                        /*
+                         * It's not possible for pmdKnownBroken to change from true to false,
+                         * (once true, always true) so pmd cannot be null here.
+                         */
                         sqlType = pmd.getParameterType(i + 1);
                     } catch (SQLException e) {
                         pmdKnownBroken = true;



Mime
View raw message