UTIL Code Clean Up 63/42263/3
authorClaudio <cgaspari@cisco.com>
Thu, 21 Jul 2016 21:12:23 +0000 (23:12 +0200)
committerMilos Fabian <milfabia@cisco.com>
Tue, 26 Jul 2016 14:24:45 +0000 (14:24 +0000)
Fix sonar complains, naming convention, declare final
method/classes, etc..

Change-Id: Ice7cc8b054fa7200842da970d2d1c3eae2eac8e4
Signed-off-by: Claudio <cgaspari@cisco.com>
util/src/test/java/org/opendaylight/protocol/util/ByteArrayTest.java
util/src/test/java/org/opendaylight/protocol/util/ByteBufWriteUtilTest.java
util/src/test/java/org/opendaylight/protocol/util/PCEPHexDumpParserTest.java
util/src/test/java/org/opendaylight/protocol/util/StatisticsUtilTest.java
util/src/test/java/org/opendaylight/protocol/util/ValuesTest.java

index 5fe3b5f28cb66b4e6409e4f7865e6f5795ebe13b..0cea42d6823c8f933664aeeecd944af62eab8c01 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.Test;
 
 public class ByteArrayTest {
 
-    byte[] before = new byte[] { 15, 28, 4, 6, 9, 10 };
+    final byte[] before = new byte[] { 15, 28, 4, 6, 9, 10 };
 
     @Test
     public void testReadBytes() {
@@ -132,7 +132,7 @@ public class ByteArrayTest {
     }
 
     private final byte[] inBytes = { (byte) 0x03, (byte) 0xFF, (byte) 0x01, (byte) 0x80 };
-    BitSet inBitSet = new BitSet();
+    final BitSet inBitSet = new BitSet();
 
     @Before
     public void generateBitSet() {
index ed6a3d513696ec1e3d63482c73c59e3773217016..e6e9b13c9ea570c21808a8c02f8df9283185b9b0 100644 (file)
@@ -242,7 +242,7 @@ public class ByteBufWriteUtilTest {
         c.setAccessible(true);
         try {
             c.newInstance();
-        } catch (InvocationTargetException e) {
+        } catch (final InvocationTargetException e) {
             throw e.getCause();
         }
     }
index 6f2a044138591e5918a87b950e786a7d9f73c94d..8262e9fe5698f07c61a0a765e905a489080161f0 100644 (file)
@@ -49,7 +49,7 @@ public class PCEPHexDumpParserTest {
         c.setAccessible(true);
         try {
             c.newInstance();
-        } catch (InvocationTargetException e) {
+        } catch (final InvocationTargetException e) {
             throw e.getCause();
         }
     }
index 682e69709ee8114ca2d9bf89f2f318dd108ace58..d3aa348bacdcbb842bafca98a180a59b3f970ff6 100644 (file)
@@ -37,7 +37,7 @@ public class StatisticsUtilTest {
         c.setAccessible(true);
         try {
             c.newInstance();
-        } catch (InvocationTargetException e) {
+        } catch (final InvocationTargetException e) {
             throw e.getCause();
         }
     }
index a911dfff87e1d69b5275409d161462c6fb654a16..0f3a91f3b6499e6f138403469fcae9b2b3149ac0 100644 (file)
@@ -20,7 +20,7 @@ public class ValuesTest {
         c.setAccessible(true);
         try {
             c.newInstance();
-        } catch (InvocationTargetException e) {
+        } catch (final InvocationTargetException e) {
             throw e.getCause();
         }
     }