Merge changes I34a6851c,I046e6272,I169f6b40,Iec24bf37,I89933b0c
[openflowjava.git] / simple-client / src / main / java / org / opendaylight / openflowjava / protocol / impl / clients / ClientSslTrustStore.java
index 1379c8dd8a488b9356472c677d34f3f5c6f9fabd..5f7929f686366a4c19d366e972f21abe4127d373 100644 (file)
@@ -17,7 +17,11 @@ import java.io.InputStream;
  */
 public final class ClientSslTrustStore {
 
-    private static final String filename = "/selfSignedController";
+    private static final String KEY_STORE_FILENAME = "/selfSignedController";
+
+    private ClientSslTrustStore() {
+        throw new UnsupportedOperationException("Utility class shouldn't be instantiated");
+    }
 
     /**
      * InputStream instance of key
@@ -25,9 +29,9 @@ public final class ClientSslTrustStore {
      * @return key as InputStream
      */
     public static InputStream asInputStream() {
-        InputStream in = ClientSslTrustStore.class.getResourceAsStream(filename);
+        InputStream in = ClientSslTrustStore.class.getResourceAsStream(KEY_STORE_FILENAME);
         if (in == null) {
-            throw new IllegalStateException("KeyStore file not found: " + filename);
+            throw new IllegalStateException("KeyStore file not found: " + KEY_STORE_FILENAME);
         }
         return in;
     }