Appending dummy root node to XML data format
[ccsdk/sli/plugins.git] / restconf-client / provider / src / main / java / org / onap / ccsdk / sli / plugins / yangserializers / dfserializer / DfSerializerUtil.java
index 598b08c..fbebd2b 100644 (file)
@@ -210,11 +210,10 @@ public final class DfSerializerUtil {
      * @return base type definition
      */
     static TypeDefinition<?> resolveBaseTypeFrom(TypeDefinition<?> type) {
-        TypeDefinition superType;
-        for(superType = type; superType.getBaseType() != null;
-            superType = superType.getBaseType()) {
+        TypeDefinition superType = type;
+        while (superType.getBaseType() != null) {
+            superType = superType.getBaseType();
         }
         return superType;
     }
-
 }