commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1806197 - /commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
Date Fri, 25 Aug 2017 16:29:03 GMT
Author: ggregory
Date: Fri Aug 25 16:29:03 2017
New Revision: 1806197

URL: http://svn.apache.org/viewvc?rev=1806197&view=rev
Log:
Convert 'for' loops to enhanced 'for' loops.

Modified:
    commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java

Modified: commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java
URL: http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java?rev=1806197&r1=1806196&r2=1806197&view=diff
==============================================================================
--- commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java (original)
+++ commons/proper/bcel/trunk/src/main/java/org/apache/bcel/generic/MethodGen.java Fri Aug
25 16:29:03 2017
@@ -705,10 +705,10 @@ public class MethodGen extends FieldGenO
         LocalVariable[] lv = lvt.getLocalVariableTable();
         LocalVariable[] lvg = local_variable_type_table.getLocalVariableTypeTable();
 
-        for (int i = 0, length = lvg.length; i < length; i++) {
+        for (LocalVariable element : lvg) {
             for (LocalVariable l : lv) {
-                if (lvg[i].getName().equals(l.getName()) && lvg[i].getIndex() ==
l.getIndex()) {
-                    lvg[i].setLength(l.getLength());
+                if (element.getName().equals(l.getName()) && element.getIndex() ==
l.getIndex()) {
+                    element.setLength(l.getLength());
                     break;
                 }
             }



Mime
View raw message