Added a foreach loop

git-svn-id: 
https://svn.apache.org/repos/asf/commons/proper/dbutils/branches/2_0@1481745 
13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/commons-dbutils/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbutils/commit/392c9fb1
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbutils/tree/392c9fb1
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbutils/diff/392c9fb1

Branch: refs/heads/2_0
Commit: 392c9fb1e69b2337365e4ac1d04c78470ca984b1
Parents: c05691b
Author: Emmanuel Bourg <[email protected]>
Authored: Mon May 13 09:18:10 2013 +0000
Committer: Emmanuel Bourg <[email protected]>
Committed: Mon May 13 09:18:10 2013 +0000

----------------------------------------------------------------------
 .../commons/dbutils2/wrappers/SqlNullCheckedResultSet.java    | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbutils/blob/392c9fb1/src/main/java/org/apache/commons/dbutils2/wrappers/SqlNullCheckedResultSet.java
----------------------------------------------------------------------
diff --git 
a/src/main/java/org/apache/commons/dbutils2/wrappers/SqlNullCheckedResultSet.java
 
b/src/main/java/org/apache/commons/dbutils2/wrappers/SqlNullCheckedResultSet.java
index 71e6661..86a3799 100644
--- 
a/src/main/java/org/apache/commons/dbutils2/wrappers/SqlNullCheckedResultSet.java
+++ 
b/src/main/java/org/apache/commons/dbutils2/wrappers/SqlNullCheckedResultSet.java
@@ -83,13 +83,12 @@ public class SqlNullCheckedResultSet implements 
InvocationHandler {
     private static final String GET_NULL_PREFIX = "getNull";
 
     static {
-        Method[] methods = SqlNullCheckedResultSet.class.getMethods();
-        for (int i = 0; i < methods.length; i++) {
-            String methodName = methods[i].getName();
+        for (Method method : SqlNullCheckedResultSet.class.getMethods()) {
+            String methodName = method.getName();
 
             if (methodName.startsWith(GET_NULL_PREFIX)) {
                 String normalName = "get" + 
methodName.substring(GET_NULL_PREFIX.length());
-                nullMethods.put(normalName, methods[i]);
+                nullMethods.put(normalName, method);
             }
         }
     }

Reply via email to