Remove the useless string format 75/13775/1
authorluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 08:47:51 +0000 (16:47 +0800)
committerluxin <luxin7@huawei.com>
Wed, 20 Sep 2017 08:47:51 +0000 (16:47 +0800)
Change-Id: I3dad973007b5073aaa5cd94a7f64b28d61e9ce3e
Issue-Id:VFC-375
Signed-off-by: luxin <luxin7@huawei.com>
huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java

index b9fa5e3..c2fa94a 100644 (file)
@@ -30,7 +30,7 @@ import org.slf4j.LoggerFactory;
  * .</br>
  *
  * @author
- * @version     VFC 1.0  Sep 14, 2016
+ * @version VFC 1.0 Sep 14, 2016
  */
 public class SslProtocolSocketFactory {
 
@@ -46,7 +46,7 @@ public class SslProtocolSocketFactory {
      * <br>
      *
      * @return
-     * @since  VFC 1.0
+     * @since VFC 1.0
      */
     public static synchronized SslProtocolSocketFactory getInstance() {
         if(singleinstance == null) {
@@ -56,13 +56,12 @@ public class SslProtocolSocketFactory {
     }
 
     /**
-     *
      * <br>
      *
      * @param authenticateMode
      * @return
      * @throws VnfmException
-     * @since  VFC 1.0
+     * @since VFC 1.0
      */
     public synchronized ProtocolSocketFactory get(String authenticateMode) throws VnfmException {
         if(SOCKMAP.get(authenticateMode) == null) {
@@ -70,13 +69,13 @@ public class SslProtocolSocketFactory {
                 SslAnonymousSocket anonymous = new SslAnonymousSocket();
                 anonymous.init();
                 SOCKMAP.put(Constant.ANONYMOUS, anonymous);
-            }else if (Constant.CERTIFICATE.equals(authenticateMode)){
+            } else if(Constant.CERTIFICATE.equals(authenticateMode)) {
                 SslCertificateSocket certificateSocket = new SslCertificateSocket();
                 certificateSocket.init();
                 SOCKMAP.put(Constant.CERTIFICATE, certificateSocket);
             } else {
                 LOG.error("funtion=get, msg=ProtocolSocketFactory Unknown AuthenticateMode={}", authenticateMode);
-                throw new VnfmException(String.format("Illegal Auth mode", authenticateMode));
+                throw new VnfmException("Illegal Auth mode: " + authenticateMode);
             }
         }
 
@@ -89,7 +88,7 @@ public class SslProtocolSocketFactory {
      *
      * @param autherMode
      * @throws VnfmException
-     * @since  VFC 1.0
+     * @since VFC 1.0
      */
     public synchronized void refresh(String autherMode) throws VnfmException {
         if(Constant.ANONYMOUS.equals(autherMode)) {