Fix Sonar (soon Checkstyle) TrailingComment 96/41296/1
authorMichael Vorburger <vorburger@redhat.com>
Mon, 4 Jul 2016 17:32:29 +0000 (19:32 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 4 Jul 2016 17:32:29 +0000 (19:32 +0200)
Change-Id: Ic961c8ae27060cb7ba034ca7a4ffff668d982e58
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundUtil.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java

index b11dffe881d21e52420ff942135f62b199e0bfb6..a796cc6c732446f73188062142fa085d735f67e2 100644 (file)
@@ -70,7 +70,8 @@ public class SouthboundUtil {
             OvsdbNodeRef ref = mn.getManagedBy();
             if (ref != null && ref.getValue() != null) {
                 ReadOnlyTransaction transaction = db.newReadOnlyTransaction();
-                @SuppressWarnings("unchecked") // Note: erasure makes this safe in combination with the typecheck below
+                @SuppressWarnings("unchecked")
+                // Note: erasure makes this safe in combination with the typecheck below
                 InstanceIdentifier<Node> path = (InstanceIdentifier<Node>) ref.getValue();
 
                 CheckedFuture<Optional<Node>, ReadFailedException> nf = transaction.read(
index 09e90faee1a6dc785dc50493552177071eac9aeb..90426ebbb170543b6411cecfc1cff9bca3499022 100644 (file)
@@ -129,7 +129,8 @@ public class TransactUtils {
                     Node value = (Node) created.getValue();
                     Class<?> type = created.getKey().getTargetType();
                     if (type.equals(Node.class)) {
-                        @SuppressWarnings("unchecked") // Actually checked above
+                        // Actually checked above
+                        @SuppressWarnings("unchecked")
                         InstanceIdentifier<Node> iid = (InstanceIdentifier<Node>) created.getKey();
                         result.put(iid, value);
                     }
@@ -277,7 +278,8 @@ public class TransactUtils {
         if (changes != null && changes.getRemovedPaths() != null) {
             for (InstanceIdentifier<?> iid : changes.getRemovedPaths()) {
                 if (iid.getTargetType().equals(klazz)) {
-                    @SuppressWarnings("unchecked") // Actually checked above
+                    // Actually checked above
+                    @SuppressWarnings("unchecked")
                     InstanceIdentifier<T> iidn = (InstanceIdentifier<T>)iid;
                     result.add(iidn);
                 }
@@ -419,7 +421,8 @@ public class TransactUtils {
                     T value = (T) created.getValue();
                     Class<?> type = created.getKey().getTargetType();
                     if (type.equals(klazz)) {
-                        @SuppressWarnings("unchecked") // Actually checked above
+                        // Actually checked above
+                        @SuppressWarnings("unchecked")
                         InstanceIdentifier<T> iid = (InstanceIdentifier<T>) created.getKey();
                         result.put(iid, value);
                     }
@@ -506,8 +509,8 @@ public class TransactUtils {
         }
 
         StringBuffer buf = new StringBuffer();
-        for (int i = 0; i < bytes.length; i++) {
-            short u8byte = (short) (bytes[i] & 0xff);
+        for (byte b : bytes) {
+            short u8byte = (short) (b & 0xff);
             String tmp = Integer.toHexString(u8byte);
             if (tmp.length() == 1) {
                 buf.append("0");