Use foreach loops
[controller.git] / opendaylight / md-sal / sal-common-impl / src / main / java / org / opendaylight / controller / md / sal / common / impl / util / compat / DataNormalizer.java
index 9876a57d1a23fd2996398709db738747c57cbea6..10f53f05e31dcb572a0d6f9dcb09229d6354b5fd 100644 (file)
@@ -56,10 +56,9 @@ public class DataNormalizer {
 
     public DataNormalizationOperation<?> getOperation(final YangInstanceIdentifier legacy) throws DataNormalizationException {
         DataNormalizationOperation<?> currentOp = operation;
-        Iterator<PathArgument> arguments = legacy.getPathArguments().iterator();
 
-        while (arguments.hasNext()) {
-            currentOp = currentOp.getChild(arguments.next());
+        for (PathArgument pathArgument : legacy.getPathArguments()) {
+            currentOp = currentOp.getChild(pathArgument);
         }
         return currentOp;
     }