commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wspe...@apache.org
Subject svn commit: r1205609 - in /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils: AsyncQueryRunner.java QueryRunner.java handlers/BeanMapHandler.java handlers/ColumnListHandler.java handlers/KeyedHandler.java handlers/ScalarHandler.java
Date Wed, 23 Nov 2011 21:29:51 GMT
Author: wspeirs
Date: Wed Nov 23 21:29:50 2011
New Revision: 1205609

URL: http://svn.apache.org/viewvc?rev=1205609&view=rev
Log:
- Removed trailing spaces
- Added final modifiers to fields in BeanMapHandler
- Added comments for why CCE warnings are suppressed

Modified:
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/AsyncQueryRunner.java
Wed Nov 23 21:29:50 2011
@@ -48,7 +48,7 @@ public class AsyncQueryRunner extends Ab
 
     /**
      * Constructor for AsyncQueryRunner that controls the use of <code>ParameterMetaData</code>.
-     * 
+     *
      * @param pmdKnownBroken Some drivers don't support {@link java.sql.ParameterMetaData#getParameterType(int)
};
      * if <code>pmdKnownBroken</code> is set to true, we won't even try it; if
false, we'll try it,
      * and if it breaks, we'll remember not to use it again.
@@ -60,7 +60,7 @@ public class AsyncQueryRunner extends Ab
 
     /**
      * Constructor for AsyncQueryRunner that takes a <code>DataSource</code>.
-     * 
+     *
      * Methods that do not take a <code>Connection</code> parameter will retrieve
connections from this
      * <code>DataSource</code>.
      *
@@ -72,7 +72,7 @@ public class AsyncQueryRunner extends Ab
     }
 
     /**
-     * Constructor for AsyncQueryRunner that take a <code>DataSource</code> to
use and controls the use of <code>ParameterMetaData</code>.
+     * Constructor for AsyncQueryRunner that take a <code>DataSource</code> and
controls the use of <code>ParameterMetaData</code>.
      * Methods that do not take a <code>Connection</code> parameter will retrieve
connections from this
      * <code>DataSource</code>.
      *

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/QueryRunner.java
Wed Nov 23 21:29:50 2011
@@ -40,7 +40,7 @@ public class QueryRunner extends Abstrac
 
     /**
      * Constructor for QueryRunner that controls the use of <code>ParameterMetaData</code>.
-     * 
+     *
      * @param pmdKnownBroken Some drivers don't support {@link java.sql.ParameterMetaData#getParameterType(int)
};
      * if <code>pmdKnownBroken</code> is set to true, we won't even try it; if
false, we'll try it,
      * and if it breaks, we'll remember not to use it again.
@@ -51,7 +51,7 @@ public class QueryRunner extends Abstrac
 
     /**
      * Constructor for QueryRunner that takes a <code>DataSource</code> to use.
-     * 
+     *
      * Methods that do not take a <code>Connection</code> parameter will retrieve
connections from this
      * <code>DataSource</code>.
      *
@@ -62,7 +62,7 @@ public class QueryRunner extends Abstrac
     }
 
     /**
-     * Constructor for QueryRunner that takes a <code>DataSource</code> to use
and controls the use of <code>ParameterMetaData</code>.
+     * Constructor for QueryRunner that takes a <code>DataSource</code> and controls
the use of <code>ParameterMetaData</code>.
      * Methods that do not take a <code>Connection</code> parameter will retrieve
connections from this
      * <code>DataSource</code>.
      *

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java
Wed Nov 23 21:29:50 2011
@@ -60,23 +60,23 @@ public class BeanMapHandler<K, V> extend
     /**
      * The Class of beans produced by this handler.
      */
-    private Class<V> type;
+    private final Class<V> type;
 
     /**
      * The RowProcessor implementation to use when converting rows into Objects.
      */
-    private RowProcessor convert;
+    private final RowProcessor convert;
 
     /**
      * The column index to retrieve key values from. Defaults to 1.
      */
-    private int columnIndex;
+    private final int columnIndex;
 
     /**
      * The column name to retrieve key values from. Either columnName or
      * columnIndex will be used but never both.
      */
-    private String columnName;
+    private final String columnName;
 
     /**
      * Creates a new instance of BeanMapHandler. The value of the first column
@@ -155,7 +155,7 @@ public class BeanMapHandler<K, V> extend
         this.columnName = columnName;
     }
 
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked") // cast exception will immediately be thrown and warn
the developer
     @Override
     protected K createKey(ResultSet rs) throws SQLException {
         return (columnName == null) ?

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java
Wed Nov 23 21:29:50 2011
@@ -90,7 +90,7 @@ public class ColumnListHandler<T> extend
      *
      * @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet)
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked") // cast exception will immediately be thrown and warn
the developer
     @Override
     protected T handleRow(ResultSet rs) throws SQLException {
         if (this.columnName == null) {

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/KeyedHandler.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/KeyedHandler.java
Wed Nov 23 21:29:50 2011
@@ -131,7 +131,7 @@ public class KeyedHandler<K> extends Abs
      * @return Object from the configured key column name/index
      * @throws SQLException if a database access error occurs
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked") // cast exception will immediately be thrown and warn
the developer
     @Override
     protected K createKey(ResultSet rs) throws SQLException {
         return (columnName == null) ?

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java?rev=1205609&r1=1205608&r2=1205609&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
Wed Nov 23 21:29:50 2011
@@ -92,7 +92,7 @@ public class ScalarHandler<T> implements
      *
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings("unchecked") // cast exception will immediately be thrown and warn
the developer
     public T handle(ResultSet rs) throws SQLException {
 
         if (rs.next()) {



Mime
View raw message