Add private ServiceLoaderState constructors 87/94187/4
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 11 Dec 2020 02:24:43 +0000 (03:24 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 11 Dec 2020 07:43:38 +0000 (08:43 +0100)
These three classes are pure field holders, hence they should have
private constructors.

Change-Id: I02818541a7a20808d3fc6f35b56e40c993a9ca94
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-runtime-spi/src/main/java/org/opendaylight/mdsal/binding/runtime/spi/ServiceLoaderState.java

index 0e88bdab05a852c4e932483b25eeef8b84a88b7c..9398311ea2ed06df46e02a06659451d74af7e90e 100644 (file)
@@ -21,10 +21,22 @@ final class ServiceLoaderState {
     static final class Generator {
         static final BindingRuntimeGenerator INSTANCE = ServiceLoader.load(BindingRuntimeGenerator.class).findFirst()
                 .orElseThrow(() -> new ExceptionInInitializerError("No BindingRuntimeGenerator found"));
+
+        private Generator() {
+            // Hidden on purpose
+        }
     }
 
     static final class ParserFactory {
         static final YangParserFactory INSTANCE = ServiceLoader.load(YangParserFactory.class).findFirst()
                 .orElseThrow(() -> new ExceptionInInitializerError("No YangParserFactory found"));
+
+        private ParserFactory() {
+            // Hodden on purpose
+        }
+    }
+
+    private ServiceLoaderState() {
+        // Hidden on purpose
     }
 }