Migrate OSGI compendium reference
[controller.git] / opendaylight / md-sal / sal-common-impl / src / main / java / org / opendaylight / controller / md / sal / common / impl / util / compat / DataNormalizer.java
index 9876a57d1a23fd2996398709db738747c57cbea6..21ddd2fbba5b33c70fb572f1f3d3879b431e1fb2 100644 (file)
@@ -16,10 +16,12 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum
 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 
 /**
+ * Deprecated.
+ *
  * @deprecated This class provides compatibility between XML semantics
- * and {@link org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree}
+ *     and {@link org.opendaylight.yangtools.yang.data.util.DataSchemaContextTree}
  */
-@Deprecated
+@Deprecated(forRemoval = true)
 public class DataNormalizer {
 
     private final DataNormalizationOperation<?> operation;
@@ -54,12 +56,12 @@ public class DataNormalizer {
         return YangInstanceIdentifier.create(normalizedArgs.build());
     }
 
-    public DataNormalizationOperation<?> getOperation(final YangInstanceIdentifier legacy) throws DataNormalizationException {
+    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;
     }
@@ -79,5 +81,4 @@ public class DataNormalizer {
     public DataNormalizationOperation<?> getRootOperation() {
         return operation;
     }
-
 }