summaryrefslogtreecommitdiffstats
path: root/huawei
diff options
context:
space:
mode:
authorGao Weitao <victor.gao@huawei.com>2017-09-20 09:43:31 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-20 09:43:31 +0000
commit1bdeeb9d0e3deaf6aa1e41ec9b51ed0588195cc0 (patch)
tree0a6ed048ed1a45af8c924569b40f56814c4c4081 /huawei
parent2407600251db0ab82627e9177031b0cfcc4fedf4 (diff)
parentc5af6881f08bc86e1564b075095fdec4189e6086 (diff)
Merge "Remove the useless string format"
Diffstat (limited to 'huawei')
-rw-r--r--huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java
index b9fa5e39..c2fa94a7 100644
--- a/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java
+++ b/huawei/vnfmadapter/VnfmadapterService/service/src/main/java/org/onap/vfc/nfvo/vnfm/svnfm/vnfmadapter/service/csm/connect/SslProtocolSocketFactory.java
@@ -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)) {