Fix CS warnings in cds-access-api and enable enforcement
[controller.git] / opendaylight / md-sal / cds-access-api / src / main / java / org / opendaylight / controller / cluster / access / commands / PersistenceProtocol.java
index 36acfb2925a66aa932812a43cc0fdc96dbff7e63..c1377fc102cf58fdbce02ebf84241407a72c8c81 100644 (file)
@@ -58,18 +58,18 @@ public enum PersistenceProtocol implements WritableObject {
         out.writeByte(byteValue());
     }
 
-    abstract byte byteValue();
-
     public static PersistenceProtocol readFrom(final DataInput in) throws IOException {
         return valueOf(in.readByte());
     }
 
+    abstract byte byteValue();
+
     static int byteValue(final PersistenceProtocol finish) {
         return finish == null ? 0 : finish.byteValue();
     }
 
-    static PersistenceProtocol valueOf(final byte b) {
-        switch (b) {
+    static PersistenceProtocol valueOf(final byte value) {
+        switch (value) {
             case 0:
                 return null;
             case 1:
@@ -79,7 +79,7 @@ public enum PersistenceProtocol implements WritableObject {
             case 3:
                 return THREE_PHASE;
             default:
-                throw new IllegalArgumentException("Unhandled byte value " + b);
+                throw new IllegalArgumentException("Unhandled byte value " + value);
         }
     }
 }