Remove utility class constructor exceptions 41/97241/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Aug 2021 20:49:20 +0000 (22:49 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 17 Aug 2021 20:49:20 +0000 (22:49 +0200)
There is no point in guarding private constructors, just use a simple
comment.

Change-Id: I19391f8cae07af5280998d294c6fa0a7347e5fac
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
45 files changed:
applications/forwardingrules-manager/src/main/java/org/opendaylight/openflowplugin/applications/frm/util/FrmUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/FlowCapableNodeLookups.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/FxChainUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ModificationUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/PathUtil.java
applications/forwardingrules-sync/src/main/java/org/opendaylight/openflowplugin/applications/frsync/util/ReconcileUtil.java
applications/topology-manager/src/main/java/org/opendaylight/openflowplugin/applications/topology/manager/FlowCapableNodeMapping.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/core/UdpConnectionMap.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/ActionDeserializerInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/AdditionalMessageDeserializerInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/InstructionDeserializerInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/MatchEntryDeserializerInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/MessageDeserializerInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/TypeToClassMapInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/deserialization/match/OxmDeserializerHelper.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/ActionsInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/AdditionalMessageFactoryInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/InstructionsInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/MatchEntriesInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/serialization/MessageFactoryInitializer.java
openflowjava/openflow-protocol-impl/src/main/java/org/opendaylight/openflowjava/protocol/impl/util/ListDeserializer.java
openflowplugin-api/src/main/java/org/opendaylight/openflowplugin/api/OFConstants.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/common/MultipartRequestInputFactory.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/util/RequestContextUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/util/RequestInputUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/BarrierUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/ErrorUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/FlatBatchUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/FlowCreatorUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/FlowUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MatchNormalizationUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MatchUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MdSalRegistrationUtils.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/MeterUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/PacketInUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/PathUtil.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/util/TranslatorLibraryUtil.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ActionExtensionHelper.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/sal/convertor/common/IpConversionUtil.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ClientSslContextFactory.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ClientSslKeyStore.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ClientSslTrustStore.java
samples/simple-client/src/main/java/org/opendaylight/openflowjava/protocol/impl/clients/ScenarioFactory.java
test-provider/src/main/java/org/opendaylight/openflowplugin/test/TestProviderTransactionUtil.java

index 4093180395582a622f7617247c51b5c2c6853b1e..c8e4f9c53539d8cfd3927b1b84dcbe37ae801a01 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.applications.frm.util;
 
 import java.lang.management.ManagementFactory;
@@ -65,7 +64,7 @@ public final class FrmUtil {
     private static String JMX_OBJECT_SHARD_STATUS = "";
 
     private FrmUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static NodeId getNodeIdFromNodeIdentifier(final InstanceIdentifier<FlowCapableNode> nodeIdent) {
@@ -226,4 +225,4 @@ public final class FrmUtil {
         }
         return leader;
     }
-}
\ No newline at end of file
+}
index cf85bc277a7f8f7850df95134c70124db47add3d..a85d8524eb14a901b323b636a88069e60e56c489 100644 (file)
@@ -28,11 +28,10 @@ import org.slf4j.LoggerFactory;
  * Helpers for flow lookups in {@link FlowCapableNode}.
  */
 public final class FlowCapableNodeLookups {
-
     private static final Logger LOG = LoggerFactory.getLogger(FlowCapableNodeLookups.class);
 
     private FlowCapableNodeLookups() {
-        throw new IllegalAccessError("non instantiable util class");
+        // Hidden on purpose
     }
 
     @NonNull
index 407dd0a31061ed2a07c3a48442e8c11c1e97def8..0dd26e01013de042ba0f283d65416863d8453e20 100644 (file)
@@ -22,14 +22,12 @@ import org.slf4j.LoggerFactory;
  * Util methods for {@link com.google.common.util.concurrent.ListenableFuture} chaining.
  */
 public final class FxChainUtil {
-
     private static final Logger LOG = LoggerFactory.getLogger(FxChainUtil.class);
 
     private FxChainUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
-
     public static FutureCallback<RpcResult<Void>> logResultCallback(final NodeId nodeId, final String prefix) {
         return new FutureCallback<>() {
             @Override
index dcd5fff6e2daf8377e8cb0bd57b7ce6cd8b3f69a..e3e79a7d522ef6c23953dcc988270d88c77be498 100644 (file)
@@ -17,19 +17,13 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.nodes.N
  * Basic {@link DataTreeModification} related tools.
  */
 public final class ModificationUtil {
-
     private ModificationUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static String nodeIdValue(DataTreeModification<Node> modification) {
         final NodeId nodeId = nodeId(modification);
-
-        if (nodeId == null) {
-            return null;
-        }
-
-        return nodeId.getValue();
+        return nodeId == null ? null : nodeId.getValue();
     }
 
     public static NodeId nodeId(DataTreeModification<Node> modification) {
index 62b96d80fd51c5c28872747e414e9b56636cce23..91de17a17eeb56c9a8fc5c9665440ebcd36e0c62 100644 (file)
@@ -17,7 +17,7 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  */
 public final class PathUtil {
     private PathUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static NodeId digNodeId(final InstanceIdentifier<?> nodeIdent) {
index 0d3799768da246b88e2144a9f1e6650ccc5fd97d..1832ad76b03ca4864cbabb9bb5baeb8b26ab69d5 100644 (file)
@@ -52,11 +52,10 @@ import org.slf4j.LoggerFactory;
  * Util methods for group reconcil task (future chaining, transforms).
  */
 public final class ReconcileUtil {
-
     private static final Logger LOG = LoggerFactory.getLogger(ReconcileUtil.class);
 
     private ReconcileUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     /**
index 8a30779780fb34b1319d6f480c783712ff9e3d8b..9217a04f190a1eda8f23e7805974fafc7abe93f6 100644 (file)
@@ -28,9 +28,8 @@ import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.
 import org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.network.topology.topology.node.TerminationPointBuilder;
 
 public final class FlowCapableNodeMapping {
-
     private FlowCapableNodeMapping() {
-        throw new UnsupportedOperationException("Utility class.");
+        // Hidden on purpose
     }
 
     public static NodeKey getNodeKey(final NodeRef ref) {
index 826685559e501d616f2ad2de03a997bd594c59a5..ed551329068ec9969ca567545c12f749553d1750 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowjava.protocol.impl.core;
 
 import java.net.InetSocketAddress;
@@ -20,11 +19,10 @@ import org.opendaylight.openflowjava.protocol.impl.core.connection.MessageConsum
  * @author michal.polkorab
  */
 public final class UdpConnectionMap {
-
     private static Map<InetSocketAddress, MessageConsumer> connectionMap = new ConcurrentHashMap<>();
 
     private UdpConnectionMap() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 89d3734c4e712017ab5838f9cfcfb0e3b9eac9ec..0b52f894973926479f0da3ac13723f6ffa4cdb48 100644 (file)
@@ -48,7 +48,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
  */
 public final class ActionDeserializerInitializer {
     private ActionDeserializerInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 249cae88f38203f010db5b7e7394f148962c0507..e2d10aa6d5923cafac26628fde616f4ed18de7f7 100644 (file)
@@ -54,7 +54,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  */
 public final class AdditionalMessageDeserializerInitializer {
     private AdditionalMessageDeserializerInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index c91e77ef5089fb752e84b911393f8ec851a258c1..6308bf6a4a42a9d19238bdd18730d45223c94b73 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowjava.protocol.impl.deserialization;
 
 import org.opendaylight.openflowjava.protocol.api.extensibility.DeserializerRegistry;
@@ -24,9 +23,8 @@ import org.opendaylight.openflowjava.protocol.impl.util.InstructionDeserializerR
  * @author michal.polkorab
  */
 public final class InstructionDeserializerInitializer {
-
     private InstructionDeserializerInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 11c63acc5522882a92315d18b3ae3090a347ad68..77ad5911becd162a073c1a1bc754efea8f929e1b 100644 (file)
@@ -59,9 +59,8 @@ import org.opendaylight.openflowjava.protocol.impl.util.MatchEntryDeserializerRe
  * @author michal.polkorab
  */
 public final class MatchEntryDeserializerInitializer {
-
     private MatchEntryDeserializerInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 79873cc1b49a31329d6dc3ba906034981c29e459..d8c9dd276b9f74beba2b6d444202d2d6f6b5a57b 100644 (file)
@@ -55,9 +55,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * @author michal.polkorab
  */
 public final class MessageDeserializerInitializer {
-
     private MessageDeserializerInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 47bf9054492199051f0dbb29e97b05328705acb6..62d65e380d36efd9a99bf8222a56d2b479172c03 100644 (file)
@@ -48,9 +48,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * @author giuseppex.petralia@intel.com
  */
 public final class TypeToClassMapInitializer {
-
     private TypeToClassMapInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 4d8601127d5ce60cb9a54e49f4371ef1d0c48255..ec0805e7a807c97628df97ba64b982411e022c14 100644 (file)
@@ -18,9 +18,8 @@ import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.
  * @author michal.polkorab
  */
 public final class OxmDeserializerHelper {
-
     private OxmDeserializerHelper() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index debfd3096248735302d0c90f8972e5f0099df51a..42b663cb9c09560e650e24a2fed315e71bade299 100644 (file)
@@ -60,7 +60,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetVlanPcpCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetVlanVidCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.StripVlanCase;
-//import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev130731.Group;
 
 /**
  * Initializes serializer registry with action serializers.
@@ -68,9 +67,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev1
  * @author michal.polkorab
  */
 public final class ActionsInitializer {
-
     private ActionsInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index ee0539982e14f089d3487d96f23f73e50f90d9c6..2cb7b63984d7c9a440bfc09a2cab78804cc3238f 100644 (file)
@@ -58,7 +58,7 @@ import org.opendaylight.yangtools.yang.common.Uint8;
  */
 public final class AdditionalMessageFactoryInitializer {
     private AdditionalMessageFactoryInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 1838fda400ade14d4899a0ca4b01bf4f60b0c8eb..89ed4bb600ec74881eee4cd6e0f542cf511720c9 100644 (file)
@@ -30,7 +30,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.instruction
  */
 public final class InstructionsInitializer {
     private InstructionsInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 4ebfcce0c0c86c59f98dd88152bd07583dd158d9..3c4e697b6efd6194f433f4c43f5d04fae3f73cd7 100644 (file)
@@ -101,9 +101,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Vlan
  * @author michal.polkorab
  */
 public final class MatchEntriesInitializer {
-
     private MatchEntriesInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index ca5ffe1a60b9276e119088a19e40fec831e3e313..9511148475d9812339d9d293f1dcfe7eccaa0776 100644 (file)
@@ -62,9 +62,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * @author michal.polkorab
  */
 public final class MessageFactoryInitializer {
-
     private MessageFactoryInitializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 5a6d25619ccecbe5849928198b49d3b5930a0870..106708fe7054e1e2cd9c4500830a125867713a18 100644 (file)
@@ -27,7 +27,7 @@ public final class ListDeserializer {
     private static final Logger LOG = LoggerFactory.getLogger(ListDeserializer.class);
 
     private ListDeserializer() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 78cb45be493abcc23d088eab0788b477b85aab9b..4c00e421d3c77e6f8cb59d0c197909a9b869b67a 100644 (file)
@@ -20,11 +20,6 @@ import org.opendaylight.yangtools.yang.common.Uint8;
  * OFP related constants.
  */
 public final class OFConstants {
-
-    private OFConstants() {
-        throw new UnsupportedOperationException("OF plugin Constants holder class");
-    }
-
     /** enum ofp_port_no, reserved port: process with normal L2/L3 switching.  */
     public static final short OFPP_NORMAL = (short)0xfffa;
     /** enum ofp_port_no, reserved port: all physical ports except input port.  */
@@ -82,4 +77,8 @@ public final class OFConstants {
 
     /** supported version ordered by height (highest version is at the beginning). */
     public static final List<Uint8> VERSION_ORDER = List.of(OFP_VERSION_1_3, OFP_VERSION_1_0);
+
+    private OFConstants() {
+        // Hidden on purpose
+    }
 }
index 4cb46570077dcc7d792eae5345b991b11f7782bb..5419888e5bbd86ac0d011032ef347492b3383521 100644 (file)
@@ -67,9 +67,8 @@ import org.opendaylight.yangtools.yang.common.Uint8;
  * without touch OF specification 1.3.2  - a section 7.3.5. Multipart Messages
  */
 public final class MultipartRequestInputFactory {
-
     private MultipartRequestInputFactory() {
-        throw new UnsupportedOperationException("Factory class");
+        // Hidden on purpose
     }
 
     /**
index 0e5c62bcde5b1c664c0f2a0e79a4ce30a06843f4..5bdb5f598f9855338b643b43ca9be77664d74bde 100644 (file)
@@ -15,14 +15,12 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
 import org.slf4j.Logger;
 
 public final class RequestContextUtil {
-
     private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(RequestContextUtil.class);
 
     private RequestContextUtil() {
-        throw new UnsupportedOperationException();
+        // Hidden on purpose
     }
 
-
     public static <T> ListenableFuture<RpcResult<T>> closeRequestContextWithRpcError(
                                                                                 final RequestContext<T> requestContext,
                                                                                 final String errorMessage) {
index 9edf9422431dcbb8d2cfaf5b6878c5f6d00d9444..4c27ce6871e75097252713f0abb2cceba4a591a7 100644 (file)
@@ -15,7 +15,7 @@ import org.opendaylight.yangtools.yang.common.Uint8;
 
 public final class RequestInputUtils {
     private RequestInputUtils() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static MultipartRequestInputBuilder createMultipartHeader(final MultipartType multipart,
index 76f906d046d2c3e56c4e3e614123db7c3f8c6ff3..5a54329c0d12c83a9ec45e09175e9540a63a7b21 100755 (executable)
@@ -57,13 +57,12 @@ import org.slf4j.LoggerFactory;
  * Utils for gathering statistics.
  */
 public final class StatisticsGatheringUtils {
-
     private static final String DATE_AND_TIME_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX";
     private static final Logger LOG = LoggerFactory.getLogger(StatisticsGatheringUtils.class);
     private static final String QUEUE2_REQCTX = "QUEUE2REQCTX-";
 
     private StatisticsGatheringUtils() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     static <T extends OfHeader> ListenableFuture<Boolean> gatherStatistics(
index 5ba0697b480ff645de775add38947068f891c441..4f580bd5fbd55682cc56c5c76e954385c619ec1a 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.base.Function;
@@ -25,13 +24,10 @@ import org.opendaylight.yangtools.yang.common.RpcResult;
  * Provides barrier message chaining and factory methods.
  */
 public final class BarrierUtil {
-
-
     private BarrierUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
-
     /**
      * Chain a barrier message - regardless of previous result and use given {@link Function} to combine
      * original result and barrier result.
index cae5530c753d0ed39edbef6845c70371bbf0194b..7c2be97e08c158b64e4c041df736283e12863ee6 100644 (file)
@@ -14,9 +14,8 @@ import org.opendaylight.yangtools.yang.common.RpcError;
  * Util class for {@link RpcError}.
  */
 public final class ErrorUtil {
-
     private ErrorUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static String errorsToString(final Collection<RpcError> rpcErrors) {
index 975ddf0087e46db8bb59527cc5aed1ca54ce47ce..25f1179612805e05f5b5a69e90e2eee6ea89db89 100644 (file)
@@ -46,9 +46,8 @@ import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
  * Provides flat batch util methods.
  */
 public final class FlatBatchUtil {
-
     private FlatBatchUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static void markBarriersWhereNeeded(final List<BatchPlanStep> batchPlan) {
index 6a5dd2e331980ddab0c2b927d5d530e7242942ea..16671432cf53a05cda967778168a94097888dee6 100644 (file)
@@ -38,7 +38,7 @@ public final class FlowCreatorUtil {
             FlowConvertor.DEFAULT_OFPFF_FLOW_REM);
 
     private FlowCreatorUtil() {
-        throw new AssertionError("FlowCreatorUtil is not expected to be instantiated.");
+        // Hidden on purpose
     }
 
     public static void setWildcardedFlowMatch(final Uint8 version, final MultipartRequestFlowBuilder flowBuilder) {
index 6e9a92480b48a8c5e7e655217654ed4c2dbbbaac..da639f9efc94b7bc18f2be90b78f2f8e4c9cdf6c 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -119,7 +118,7 @@ public final class FlowUtil {
             };
 
     private FlowUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     static <K extends Identifier<V>, V extends Identifiable<K>> Map<K, V> index(final List<V> list) {
index 4580276dd9be15f90b302d9298e1e60d227e5b3e..931badc13fd2059df8f221eaca4e8334460d3187 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import static org.opendaylight.openflowplugin.impl.util.AddressNormalizationUtil.normalizeIpv4Arbitrary;
@@ -61,7 +60,7 @@ public final class MatchNormalizationUtil {
             .build();
 
     private MatchNormalizationUtil() {
-        throw new RuntimeException("Creating instance of util classes is prohibited");
+        // Hidden on purpose
     }
 
     /**
@@ -258,4 +257,4 @@ public final class MatchNormalizationUtil {
                         .build()))
                 .orElse(match);
     }
-}
\ No newline at end of file
+}
index 9f45e8addb7d87c69dcdac75d58b9436ef3c9427..a3825d41f4564d59dbb02ef8dfec37457c41b6f3 100644 (file)
@@ -104,10 +104,9 @@ public final class MatchUtil {
             .build();
 
     private MatchUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
-
     public static MatchV10Builder createEmptyV10Match() {
         return new MatchV10Builder()
                 .setDlDst(ZERO_MAC_ADDRESS)
index f37b0ee6d61ae1b66745778a2229703882f65392..f19523726de6172882c0036e963f22de75a8b467 100644 (file)
@@ -72,7 +72,7 @@ public final class MdSalRegistrationUtils {
 
     //TODO: Make one register and one unregister method for all services
     private MdSalRegistrationUtils() {
-        throw new IllegalStateException();
+        // Hidden on purpose
     }
 
     /**
index 3e4182fafa85c9c4a2ac6347267d785d472b441a..d5388c23333a65913312ffd5fbcabfebccdfa911 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import com.google.common.annotations.VisibleForTesting;
@@ -94,7 +93,7 @@ public final class MeterUtil {
         METER_UPDATE_COMPOSING_TRANSFORM = createComposingFunction();
 
     private MeterUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     /**
index b78c42be34c0778e4cad43f314d24a624c9f4b4f..91c99ab7273c222cf4827337dc4e8e5083e1a365 100644 (file)
@@ -13,9 +13,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.Pa
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.SendToController;
 
 public final class PacketInUtil {
-
     private PacketInUtil() {
-        throw new AssertionError("PacketInUtil is not expected to be instantiated.");
+        // Hidden on purpose
     }
 
     /**
index cf9be9e357fa362177699cf16c52216867bfaf32..69a2c5bf387acdb3a267cb93ba27eb2362c05bd0 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
@@ -17,9 +16,8 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
  * Purpose: utility class providing path and {@link InstanceIdentifier} tools.
  */
 public final class PathUtil {
-
     private PathUtil() {
-        throw new IllegalStateException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     /**
@@ -39,4 +37,4 @@ public final class PathUtil {
     public static NodeId extractNodeId(final NodeRef input) {
         return input.getValue().firstKeyOf(Node.class).getId();
     }
-}
\ No newline at end of file
+}
index 0c0889b7559c22b0c73ac129a627aafea9ea47d5..d640ed9f4e5c43348d891dff6cf07efeab9e0bd4 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowplugin.impl.util;
 
 import org.opendaylight.openflowplugin.api.OFConstants;
@@ -25,17 +24,15 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.multipart.reply.multipart.reply.body.MultipartReplyAggregateCase;
 
 public final class TranslatorLibraryUtil {
-
-
-    private TranslatorLibraryUtil() {
-        throw new IllegalStateException("This class should not be instantiated");
-    }
-
     private static final TranslatorKeyFactory OF_13_TRANSLATOR_KEY_FACTORY =
             new TranslatorKeyFactory(OFConstants.OFP_VERSION_1_3);
     private static final TranslatorKeyFactory OF_10_TRANSLATOR_KEY_FACTORY =
             new TranslatorKeyFactory(OFConstants.OFP_VERSION_1_0);
 
+    private TranslatorLibraryUtil() {
+        // Hidden on purpose
+    }
+
     public static void injectBasicTranslatorLibrary(final TranslatorLibrarian librarian,
                                                     final ConvertorExecutor convertorExecutor) {
         final TranslatorLibrary basicTranslatorLibrary = new TranslatorLibraryBuilder()
index db38639fbcb64ae09c1aa2906d66e7a85971f525..e2b143f84803d23a5765edda3b1071abf31424e8 100644 (file)
@@ -19,9 +19,8 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
 
 public final class ActionExtensionHelper {
-
     private ActionExtensionHelper() {
-        throw new IllegalAccessError("singleton enforcement");
+        // Hidden on purpose
     }
 
     /**
index 1706ae10ef5596c57ebeafdf2f8a366c00c183a0..0743a09c4388cca562e52223ea94de14b0c0c997 100644 (file)
@@ -91,7 +91,7 @@ public final class IpConversionUtil {
 
 
     private IpConversionUtil() {
-        throw new UnsupportedOperationException("This class should not be instantiated.");
+        // Hidden on purpose
     }
 
     public static Iterator<String> splitToParts(final Ipv4Prefix ipv4Prefix) {
index 284a2654b9ae8c485a843a0102c93282cb687dc7..06e0cc2dd1cacdc68a9ae250d1e775fc9762f547 100644 (file)
@@ -26,9 +26,8 @@ import javax.net.ssl.TrustManagerFactory;
  * @author michal.polkorab
  */
 public final class ClientSslContextFactory {
-
     private ClientSslContextFactory() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     // "TLS" - supports some version of TLS
index 8328b3cac1706a8cdfbbba811e5ba02d631a8694..52b67b0930eb9a28b79e254698a50de3ff9f35b2 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowjava.protocol.impl.clients;
 
 import java.io.InputStream;
@@ -16,11 +15,10 @@ import java.io.InputStream;
  * @author michal.polkorab
  */
 public final class ClientSslKeyStore {
-
     private static final String KEY_STORE_FILENAME = "/selfSignedSwitch";
 
     private ClientSslKeyStore() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index 6d0fe39b41337d94b94889cf3d229f063408353c..e1f4c1a35a39123b6a319cbc014dccd5aaf661eb 100644 (file)
@@ -5,7 +5,6 @@
  * 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.openflowjava.protocol.impl.clients;
 
 import java.io.InputStream;
@@ -16,11 +15,10 @@ import java.io.InputStream;
  * @author michal.polkorab
  */
 public final class ClientSslTrustStore {
-
     private static final String KEY_STORE_FILENAME = "/selfSignedController";
 
     private ClientSslTrustStore() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index daabb8045813d4c9e4d07d91d88f58246e6094c2..0544ce6347b5b0fb0ac132228b8a64d43d238fd0 100644 (file)
@@ -18,9 +18,8 @@ import org.opendaylight.openflowjava.util.ByteBufUtils;
  * @author michal.polkorab
  */
 public final class ScenarioFactory {
-
     private ScenarioFactory() {
-        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+        // Hidden on purpose
     }
 
     /**
index be5ea6b7ded758ed0471204629ab5a7b67f78501..aa701c70c801a4ffd817a08917a407a188bb323e 100644 (file)
@@ -20,11 +20,10 @@ import org.slf4j.LoggerFactory;
  * Created by Martin Bobak mbobak@cisco.com on 8/20/14.
  */
 public final class TestProviderTransactionUtil {
-
     private static final Logger LOG = LoggerFactory.getLogger(TestProviderTransactionUtil.class);
 
     private TestProviderTransactionUtil() {
-        throw new AssertionError("TestProviderTransactionUtil was not meant to be instantiated.");
+        // Hidden on purpose
     }
 
     public static <T extends DataObject> T getDataObject(ReadTransaction readOnlyTransaction,