Fix checkstyle violations in sal-dom-api
[controller.git] / opendaylight / md-sal / sal-dom-api / src / main / java / org / opendaylight / controller / md / sal / dom / api / DOMDataTreeIdentifier.java
index 8b3a8308c4a34a70c7abb3ca8652a948060aa0cd..0f015d1348014d2a627724ee965a28f84a7d35b0 100644 (file)
@@ -1,9 +1,11 @@
 /*
  * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
  * This program and the accompanying materials are made available under the
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
+
 package org.opendaylight.controller.md.sal.dom.api;
 
 import com.google.common.base.MoreObjects;
@@ -21,12 +23,14 @@ import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgum
  * A unique identifier for a particular subtree. It is composed of the logical
  * data store type and the instance identifier of the root node.
  */
-public final class DOMDataTreeIdentifier implements Immutable, Path<DOMDataTreeIdentifier>, Serializable, Comparable<DOMDataTreeIdentifier> {
+public final class DOMDataTreeIdentifier implements Immutable,
+        Path<DOMDataTreeIdentifier>, Serializable, Comparable<DOMDataTreeIdentifier> {
     private static final long serialVersionUID = 1L;
     private final YangInstanceIdentifier rootIdentifier;
     private final LogicalDatastoreType datastoreType;
 
-    public DOMDataTreeIdentifier(final LogicalDatastoreType datastoreType, final YangInstanceIdentifier rootIdentifier) {
+    public DOMDataTreeIdentifier(final LogicalDatastoreType datastoreType,
+            final YangInstanceIdentifier rootIdentifier) {
         this.datastoreType = Preconditions.checkNotNull(datastoreType);
         this.rootIdentifier = Preconditions.checkNotNull(rootIdentifier);
     }
@@ -79,14 +83,14 @@ public final class DOMDataTreeIdentifier implements Immutable, Path<DOMDataTreeI
     }
 
     @Override
-    public int compareTo(final DOMDataTreeIdentifier o) {
-        int i = datastoreType.compareTo(o.datastoreType);
-        if (i != 0) {
-            return i;
+    public int compareTo(final DOMDataTreeIdentifier obj) {
+        int cmp = datastoreType.compareTo(obj.datastoreType);
+        if (cmp != 0) {
+            return cmp;
         }
 
         final Iterator<PathArgument> mi = rootIdentifier.getPathArguments().iterator();
-        final Iterator<PathArgument> oi = o.rootIdentifier.getPathArguments().iterator();
+        final Iterator<PathArgument> oi = obj.rootIdentifier.getPathArguments().iterator();
 
         while (mi.hasNext()) {
             if (!oi.hasNext()) {
@@ -95,9 +99,9 @@ public final class DOMDataTreeIdentifier implements Immutable, Path<DOMDataTreeI
 
             final PathArgument ma = mi.next();
             final PathArgument oa = oi.next();
-            i = ma.compareTo(oa);
-            if (i != 0) {
-                return i;
+            cmp = ma.compareTo(oa);
+            if (cmp != 0) {
+                return cmp;
             }
         }