commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1305710 - in /commons/proper/dbutils/trunk/src: main/java/org/apache/commons/dbutils/ main/java/org/apache/commons/dbutils/handlers/ main/java/org/apache/commons/dbutils/wrappers/ test/java/org/apache/commons/dbutils/ test/java/org/apache/...
Date Tue, 27 Mar 2012 02:17:46 GMT
Author: sebb
Date: Tue Mar 27 02:17:45 2012
New Revision: 1305710

URL: http://svn.apache.org/viewvc?rev=1305710&view=rev
Log:
Java 1.6 requires @Override for interface implementations as well

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/BasicRowProcessor.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/MapHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ScalarHandler.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
    commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSet.java
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSetMetaData.java
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/ProxyFactoryTest.java
    commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.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=1305710&r1=1305709&r2=1305710&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
Tue Mar 27 02:17:45 2012
@@ -143,6 +143,7 @@ public class AsyncQueryRunner extends Ab
          * @throws SQLException if a database access error occurs or one of the commands
sent to the database fails.
          * @see PreparedStatement#executeBatch()
          */
+        @Override
         public int[] call() throws SQLException {
             int[] ret = null;
 
@@ -246,6 +247,7 @@ public class AsyncQueryRunner extends Ab
          * @throws SQLException if a database access error occurs.
          * @see ResultSetHandler#handle(ResultSet)
          */
+        @Override
         public T call() throws SQLException {
             ResultSet rs = null;
             T ret = null;
@@ -400,6 +402,7 @@ public class AsyncQueryRunner extends Ab
          * @throws SQLException if a database access error occurs.
          * @see PreparedStatement#executeUpdate()
          */
+        @Override
         public Integer call() throws SQLException {
             int rows = 0;
 

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/BasicRowProcessor.java
Tue Mar 27 02:17:45 2012
@@ -93,6 +93,7 @@ public class BasicRowProcessor implement
      * @throws SQLException if a database access error occurs
      * @return the newly created array
      */
+    @Override
     public Object[] toArray(ResultSet rs) throws SQLException {
         ResultSetMetaData meta = rs.getMetaData();
         int cols = meta.getColumnCount();
@@ -116,6 +117,7 @@ public class BasicRowProcessor implement
      * @throws SQLException if a database access error occurs
      * @return the newly created bean
      */
+    @Override
     public <T> T toBean(ResultSet rs, Class<T> type) throws SQLException {
         return this.convert.toBean(rs, type);
     }
@@ -132,6 +134,7 @@ public class BasicRowProcessor implement
      * @return A <code>List</code> of beans with the given type in the order
      * they were returned by the <code>ResultSet</code>.
      */
+    @Override
     public <T> List<T> toBeanList(ResultSet rs, Class<T> type) throws SQLException
{
         return this.convert.toBeanList(rs, type);
     }
@@ -146,6 +149,7 @@ public class BasicRowProcessor implement
      * @throws SQLException if a database access error occurs
      * @return the newly created Map
      */
+    @Override
     public Map<String, Object> toMap(ResultSet rs) throws SQLException {
         Map<String, Object> result = new CaseInsensitiveHashMap();
         ResultSetMetaData rsmd = rs.getMetaData();

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/ResultSetIterator.java
Tue Mar 27 02:17:45 2012
@@ -69,6 +69,7 @@ public class ResultSetIterator implement
      * @return boolean <code>true</code> if there are more rows
      * @throws RuntimeException if an SQLException occurs.
      */
+    @Override
     public boolean hasNext() {
         try {
             return !rs.isLast();
@@ -85,6 +86,7 @@ public class ResultSetIterator implement
      * @see java.util.Iterator#next()
      * @throws RuntimeException if an SQLException occurs.
      */
+    @Override
     public Object[] next() {
         try {
             rs.next();
@@ -100,6 +102,7 @@ public class ResultSetIterator implement
      * @see java.util.Iterator#remove()
      * @throws RuntimeException if an SQLException occurs.
      */
+    @Override
     public void remove() {
         try {
             this.rs.deleteRow();
@@ -127,6 +130,7 @@ public class ResultSetIterator implement
     public static Iterable<Object[]> iterable(final ResultSet rs) {
         return new Iterable<Object[]>() {
 
+            @Override
             public Iterator<Object[]> iterator() {
                 return new ResultSetIterator(rs);
             }

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java
Tue Mar 27 02:17:45 2012
@@ -46,6 +46,7 @@ public abstract class AbstractKeyedHandl
      * @throws SQLException if a database access error occurs
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
+    @Override
     public Map<K, V> handle(ResultSet rs) throws SQLException {
         Map<K, V> result = createMap();
         while (rs.next()) {

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java
Tue Mar 27 02:17:45 2012
@@ -41,6 +41,7 @@ public abstract class AbstractListHandle
      * @return a list of all rows in the result set
      * @throws SQLException error occurs
      */
+    @Override
     public List<T> handle(ResultSet rs) throws SQLException {
         List<T> rows = new ArrayList<T>();
         while (rs.next()) {

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ArrayHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/ArrayHandler.java
Tue Mar 27 02:17:45 2012
@@ -73,6 +73,7 @@ public class ArrayHandler implements Res
      * @throws SQLException if a database access error occurs
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
+    @Override
     public Object[] handle(ResultSet rs) throws SQLException {
         return rs.next() ? this.convert.toArray(rs) : null;
     }

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanHandler.java
Tue Mar 27 02:17:45 2012
@@ -75,6 +75,7 @@ public class BeanHandler<T> implements R
      * @throws SQLException if a database access error occurs
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
+    @Override
     public T handle(ResultSet rs) throws SQLException {
         return rs.next() ? this.convert.toBean(rs, this.type) : null;
     }

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanListHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/BeanListHandler.java
Tue Mar 27 02:17:45 2012
@@ -78,6 +78,7 @@ public class BeanListHandler<T> implemen
      * @throws SQLException if a database access error occurs
      * @see org.apache.commons.dbutils.RowProcessor#toBeanList(ResultSet, Class)
      */
+    @Override
     public List<T> handle(ResultSet rs) throws SQLException {
         return this.convert.toBeanList(rs, type);
     }

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/MapHandler.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/MapHandler.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/MapHandler.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/handlers/MapHandler.java
Tue Mar 27 02:17:45 2012
@@ -68,6 +68,7 @@ public class MapHandler implements Resul
      *
      * @see org.apache.commons.dbutils.ResultSetHandler#handle(java.sql.ResultSet)
      */
+    @Override
     public Map<String, Object> handle(ResultSet rs) throws SQLException {
         return rs.next() ? this.convert.toMap(rs) : 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=1305710&r1=1305709&r2=1305710&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
Tue Mar 27 02:17:45 2012
@@ -96,6 +96,7 @@ public class ScalarHandler<T> implements
     // We assume that the user has picked the correct type to match the column
     // so getObject will return the appropriate type and the cast will succeed.
     @SuppressWarnings("unchecked")
+    @Override
     public T handle(ResultSet rs) throws SQLException {
 
         if (rs.next()) {

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java
Tue Mar 27 02:17:45 2012
@@ -378,6 +378,7 @@ public class SqlNullCheckedResultSet imp
      * @return null checked result
      * @throws Throwable error
      */
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
 

Modified: commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
(original)
+++ commons/proper/dbutils/trunk/src/main/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java
Tue Mar 27 02:17:45 2012
@@ -91,6 +91,7 @@ public class StringTrimmedResultSet impl
      * @return string trimmed result
      * @throws Throwable error
      */
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
 

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSet.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSet.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSet.java
(original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSet.java
Tue Mar 27 02:17:45 2012
@@ -265,6 +265,7 @@ public class MockResultSet implements In
         return (obj == null) ? null : obj.toString();
     }
 
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
 

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSetMetaData.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSetMetaData.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSetMetaData.java
(original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/MockResultSetMetaData.java
Tue Mar 27 02:17:45 2012
@@ -58,6 +58,7 @@ public class MockResultSetMetaData imple
 
     }
 
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
 

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/ProxyFactoryTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/ProxyFactoryTest.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/ProxyFactoryTest.java
(original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/ProxyFactoryTest.java
Tue Mar 27 02:17:45 2012
@@ -27,6 +27,7 @@ public class ProxyFactoryTest extends Ba
 
     private static final InvocationHandler stub = new InvocationHandler() {
 
+        @Override
         public Object invoke(Object proxy, Method method, Object[] args)
             throws Throwable {
 

Modified: commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java
URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java?rev=1305710&r1=1305709&r2=1305710&view=diff
==============================================================================
--- commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java
(original)
+++ commons/proper/dbutils/trunk/src/test/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSetTest.java
Tue Mar 27 02:17:45 2012
@@ -817,6 +817,7 @@ class SqlNullUncheckedMockResultSet impl
      * Always return false for booleans, 0 for numerics, and null for Objects.
      * @see java.lang.reflect.InvocationHandler#invoke(java.lang.Object, java.lang.reflect.Method,
java.lang.Object[])
      */
+    @Override
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable {
 
@@ -854,39 +855,48 @@ class SqlNullUncheckedMockResultSet impl
 
 class SqlNullCheckedResultSetMockBlob implements Blob {
 
+    @Override
     public InputStream getBinaryStream() throws SQLException {
         return new ByteArrayInputStream(new byte[0]);
     }
 
+    @Override
     public byte[] getBytes(long param, int param1) throws SQLException {
         return new byte[0];
     }
 
+    @Override
     public long length() throws SQLException {
         return 0;
     }
 
+    @Override
     public long position(byte[] values, long param) throws SQLException {
         return 0;
     }
 
+    @Override
     public long position(Blob blob, long param) throws SQLException {
         return 0;
     }
 
+    @Override
     public void truncate(long len) throws SQLException {
 
     }
 
+    @Override
     public int setBytes(long pos, byte[] bytes) throws SQLException {
         return 0;
     }
 
+    @Override
     public int setBytes(long pos, byte[] bytes, int offset, int len)
         throws SQLException {
         return 0;
     }
 
+    @Override
     public OutputStream setBinaryStream(long pos) throws SQLException {
         return null;
     }
@@ -894,6 +904,7 @@ class SqlNullCheckedResultSetMockBlob im
     /**
      * @throws SQLException  
      */
+    @Override
     public void free() throws SQLException {
 
     }
@@ -901,6 +912,7 @@ class SqlNullCheckedResultSetMockBlob im
     /**
      * @throws SQLException  
      */
+    @Override
     public InputStream getBinaryStream(long pos, long length) throws SQLException {
       return null;
     }
@@ -909,46 +921,57 @@ class SqlNullCheckedResultSetMockBlob im
 
 class SqlNullCheckedResultSetMockClob implements Clob {
 
+    @Override
     public InputStream getAsciiStream() throws SQLException {
         return null;
     }
 
+    @Override
     public Reader getCharacterStream() throws SQLException {
         return null;
     }
 
+    @Override
     public String getSubString(long param, int param1) throws SQLException {
         return "";
     }
 
+    @Override
     public long length() throws SQLException {
         return 0;
     }
 
+    @Override
     public long position(Clob clob, long param) throws SQLException {
         return 0;
     }
 
+    @Override
     public long position(String str, long param) throws SQLException {
         return 0;
     }
 
+    @Override
     public void truncate(long len) throws SQLException {
 
     }
 
+    @Override
     public OutputStream setAsciiStream(long pos) throws SQLException {
         return null;
     }
 
+    @Override
     public Writer setCharacterStream(long pos) throws SQLException {
         return null;
     }
 
+    @Override
     public int setString(long pos, String str) throws SQLException {
         return 0;
     }
 
+    @Override
     public int setString(long pos, String str, int offset, int len)
         throws SQLException {
         return 0;
@@ -957,6 +980,7 @@ class SqlNullCheckedResultSetMockClob im
     /**
      * @throws SQLException  
      */
+    @Override
     public void free() throws SQLException {
 
     }
@@ -964,6 +988,7 @@ class SqlNullCheckedResultSetMockClob im
     /**
      * @throws SQLException  
      */
+    @Override
     public Reader getCharacterStream(long pos, long length) throws SQLException {
       return null;
     }
@@ -972,18 +997,22 @@ class SqlNullCheckedResultSetMockClob im
 
 class SqlNullCheckedResultSetMockRef implements Ref {
 
+    @Override
     public String getBaseTypeName() throws SQLException {
         return "";
     }
 
+    @Override
     public Object getObject() throws SQLException {
         return null;
     }
 
+    @Override
     public void setObject(Object value) throws SQLException {
 
     }
 
+    @Override
     public Object getObject(Map<String,Class<?>> map) throws SQLException {
         return null;
     }



Mime
View raw message