Hide TranslationUtil's constructor 61/14161/1
authorMarek Gradzki <mgradzki@cisco.com>
Mon, 13 Aug 2018 05:30:20 +0000 (07:30 +0200)
committerMarek Gradzki <mgradzki@cisco.com>
Mon, 13 Aug 2018 05:30:27 +0000 (07:30 +0200)
Utility classes should not be instantiated.

Change-Id: Iff821556ad6b593bce6b3e056241dc7e2bbe0c8b
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
infra/notification/impl/src/main/java/io/fd/honeycomb/notification/impl/TranslationUtil.java

index 9ba43fa..c18020f 100644 (file)
@@ -38,7 +38,9 @@ import org.opendaylight.yangtools.yang.data.codec.xml.XMLStreamNormalizedNodeStr
 
 public final class TranslationUtil {
 
-    public TranslationUtil() {}
+    private TranslationUtil() {
+        throw new UnsupportedOperationException("Utility class cannot be instantiated.");
+    }
 
     private static final Logger LOG = LoggerFactory.getLogger(TranslationUtil.class);
     private static final XMLOutputFactory XML_FACTORY;