commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wspe...@apache.org
Subject svn commit: r1205551 - in /commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers: BeanMapHandler.java ColumnListHandler.java KeyedHandler.java ScalarHandler.java
Date Wed, 23 Nov 2011 19:52:46 GMT
Author: wspeirs
Date: Wed Nov 23 19:52:45 2011
New Revision: 1205551

URL: http://svn.apache.org/viewvc?rev=1205551&view=rev
Log:
- Added warning supression for CCE

Modified:
    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/handlers/BeanMapHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanMapHandler.java?rev=1205551&r1=1205550&r2=1205551&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 19:52:45 2011
@@ -155,15 +155,16 @@ public class BeanMapHandler<K, V> extend
         this.columnName = columnName;
     }
 
+    @SuppressWarnings("unchecked")
     @Override
     protected K createKey(ResultSet rs) throws SQLException {
-        return (columnName == null) ? (K) rs.getObject(columnIndex) : (K) rs
-                .getObject(columnName);
+        return (columnName == null) ?
+               (K) rs.getObject(columnIndex) :
+               (K) rs.getObject(columnName);
     }
 
     @Override
     protected V createRow(ResultSet rs) throws SQLException {
-        // TODO Auto-generated method stub
         return this.convert.toBean(rs, type);
     }
 

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=1205551&r1=1205550&r2=1205551&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 19:52:45 2011
@@ -90,6 +90,7 @@ public class ColumnListHandler<T> extend
      *
      * @see org.apache.commons.dbutils.handlers.AbstractListHandler#handle(ResultSet)
      */
+    @SuppressWarnings("unchecked")
     @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=1205551&r1=1205550&r2=1205551&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 19:52:45 2011
@@ -131,6 +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")
     @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=1205551&r1=1205550&r2=1205551&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 19:52:45 2011
@@ -92,6 +92,7 @@ public class ScalarHandler<T> implements
      *
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
+    @SuppressWarnings("unchecked")
     public T handle(ResultSet rs) throws SQLException {
 
         if (rs.next()) {



Mime
View raw message