Fix Checkstyle "Utility classes should not have (visible) constructor" 10/41310/1
authorMichael Vorburger <vorburger@redhat.com>
Mon, 4 Jul 2016 22:45:15 +0000 (00:45 +0200)
committerMichael Vorburger <vorburger@redhat.com>
Mon, 4 Jul 2016 22:45:15 +0000 (00:45 +0200)
Change-Id: Ide9e8ee132cf2c6124dba049966a77a3a385a080
Signed-off-by: Michael Vorburger <vorburger@redhat.com>
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbSchemaContants.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundConstants.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/SouthboundMapper.java
southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/ovsdb/transact/TransactUtils.java
southbound/southbound-impl/src/test/java/org/opendaylight/ovsdb/southbound/OvsdbSchemaContantsTest.java

index 38edea33b316887c3c53269e42b16e44042aa5e3..4668814da1cd91ac513950e0ff29494671b15f94 100644 (file)
@@ -10,6 +10,8 @@ package org.opendaylight.ovsdb.southbound;
 public class OvsdbSchemaContants {
     public static final String databaseName = "Open_vSwitch";
 
+    private OvsdbSchemaContants() { }
+
     public enum OvsdbSchemaTables {
         OPENVSWITCH("Open_vSwitch",null,null),
         BRIDGE("Bridge", "Open_vSwitch", "bridges"),
index b0fb802b325436b63e9cdc65082de55b0e35cf40..0e92af39c2ec635ec98b10c5e85b299fdb7c9f5b 100755 (executable)
@@ -50,6 +50,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.ovsdb.re
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.TopologyId;
 
 public class SouthboundConstants {
+
+    private SouthboundConstants() { }
+
     public static final String OPEN_V_SWITCH = "Open_vSwitch";
     public static final TopologyId OVSDB_TOPOLOGY_ID = new TopologyId(new Uri("ovsdb:1"));
     public static final String OVSDB_URI_PREFIX = "ovsdb";
index cb2b4cd74ea0af9e2cf8d3ccf5e81e5b4b371367..385fc0686c010c5cd271a56b465dde97a900e96c 100644 (file)
@@ -66,6 +66,9 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class SouthboundMapper {
+
+    private SouthboundMapper() { }
+
     private static final Logger LOG = LoggerFactory.getLogger(SouthboundMapper.class);
     private static final String N_CONNECTIONS_STR = "n_connections";
 
index 09e90faee1a6dc785dc50493552177071eac9aeb..f65968535f073feb1f613c3fdb5ae4f9d11da48d 100644 (file)
@@ -52,6 +52,9 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 import org.opendaylight.yangtools.yang.binding.KeyedInstanceIdentifier;
 
 public class TransactUtils {
+
+    private TransactUtils() { }
+
     private static <T extends DataObject> Predicate<DataObjectModification<T>> hasDataBefore() {
         return new Predicate<DataObjectModification<T>>() {
             @Override
@@ -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");
index 2bdb0898375d1554ec81308e914b0e03c5df7d89..e1ae5771ec94a67780221fef9423ef2e341b9a04 100644 (file)
@@ -7,24 +7,17 @@
  */
 
 package org.opendaylight.ovsdb.southbound;
+
 import static org.junit.Assert.assertEquals;
 
-import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.ovsdb.southbound.OvsdbSchemaContants.OvsdbSchemaTables;
 
 public class OvsdbSchemaContantsTest {
 
-    private OvsdbSchemaContants ovsdbSchemaContants;
-
-    @Before
-    public void setUp() {
-        ovsdbSchemaContants = new OvsdbSchemaContants();
-    }
-
     @Test
     public void testDatabaseName() {
-        assertEquals("Error databaseName did not return correct value","Open_vSwitch",OvsdbSchemaContants.databaseName);
+        assertEquals("Error databaseName did not return correct value","Open_vSwitch", OvsdbSchemaContants.databaseName);
     }
     @Test
     public void testGetTableName() {