From e4b80e97a98f329af344da8d3c06423a5701a9e1 Mon Sep 17 00:00:00 2001 From: rama-huawei Date: Tue, 26 Sep 2017 18:14:26 +0530 Subject: Removed useless assignment to variables Issue-Id:SO-118 Change-Id: Ic745bcfcd895da55735a39bc22c0346339255abf Signed-off-by: rama-huawei --- .../openecomp/mso/apihandlerinfra/NetworkRequestHandler.java | 11 +++++------ .../org/openecomp/mso/apihandlerinfra/RequestActionMap.java | 2 +- .../mso/apihandlerinfra/VfModuleModelNamesHandler.java | 1 - .../org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java | 8 ++++---- .../org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java | 8 ++++---- 5 files changed, 14 insertions(+), 16 deletions(-) (limited to 'mso-api-handlers') diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java index 395b2529f5..981fee9fb6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java @@ -114,7 +114,7 @@ public class NetworkRequestHandler { + aicNodeClli + " - tenant id " + tenantId); - Response response = null; + Response response; if (networkType != null) { response = this.getRequestList ("vnfType", networkType, version); } else { @@ -244,7 +244,7 @@ public class NetworkRequestHandler { MsoLogger.setLogContext (requestId, null); getMsoLogger ().debug ("getRequest: " + requestId); - String responseString = null; + String responseString; InfraActiveRequests activeReq = requestDB.getRequestFromInfraActive (requestId, "NETWORK"); if (activeReq != null) { @@ -267,7 +267,7 @@ public class NetworkRequestHandler { queryValue, "NETWORK"); - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); if (activeReqList != null) { // build response for active @@ -311,7 +311,7 @@ public class NetworkRequestHandler { } private List infraRequestsResponses (List arList, String version) { - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); for (InfraRequests ar : arList) { NetworkRequest qr = fillGeneric (ar); @@ -383,7 +383,6 @@ public class NetworkRequestHandler { } private Response manageNetworkRequestImpl (String reqXML, String version) { - String methodName = "NetworkRequest"; props = MsoPropertiesUtils.loadMsoProperties (); @@ -577,7 +576,7 @@ public class NetworkRequestHandler { msoLogger.debug ("MSO API Handler Posting call to BPEL engine for url: " + requestClient.getUrl ()); response = requestClient.post (msoRequest.getRequestXML (), requestId, - Integer.toString (recipe.getRecipeTimeout ()).toString (), + Integer.toString (recipe.getRecipeTimeout ()), version, null, null); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java index 2b7511a22e..e68093e166 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java @@ -30,7 +30,7 @@ public class RequestActionMap { private static final Map actionMap; static { - actionMap = new HashMap(); + actionMap = new HashMap<>(); actionMap.put("CREATE_VF_MODULE", "createInstance"); actionMap.put("DELETE_VF_MODULE", "deleteInstance"); actionMap.put("UPDATE_VF_MODULE", "updateInstance"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java index a1fa8206a8..57720dcfba 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java @@ -48,7 +48,6 @@ public class VfModuleModelNamesHandler { private static MsoLogger msoLogger = MsoLogger.getMsoLogger (MsoLogger.Catalog.APIH); private static final String LOG_SERVICE_NAME = "InfrastructurePortal:MSO-APIH."; - private static final String LOG_REPLY_NAME = "MSO-APIH:InfrastructurePortal."; @GET @ApiOperation(value="Finds Vf Module Model Names",response=Response.class) diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java index c87d450cef..7071ed50c3 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java @@ -87,7 +87,7 @@ public class VnfInfoHandler { + " volume-group-id:" + volumeGroupId + " volume-group-name:" + volumeGroupName + " vnf-name: " + vnfName); - Response response = null; + Response response; if (vnfType != null) { response = this.getRequestList ("vnfType", vnfType, version); } else { @@ -253,7 +253,7 @@ public class VnfInfoHandler { getMsoLogger ().debug ("getRequest: " + requestId); - String responseString = null; + String responseString; InfraActiveRequests activeReq = (RequestsDatabase.getInstance()).getRequestFromInfraActive (requestId, getRequestType ()); if (activeReq != null) { @@ -276,7 +276,7 @@ public class VnfInfoHandler { queryValue, getRequestType ()); - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); if (activeReqList != null) { // build response for active @@ -320,7 +320,7 @@ public class VnfInfoHandler { } private List infraRequestsResponses (List arList, String version) { - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); for (InfraRequests ar : arList) { VnfRequest qr = fillGeneric (ar); diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java index 1891c00521..6618fcfb00 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java @@ -84,7 +84,7 @@ public class VolumeInfoHandler { + " tenant-id:" + tenantId + " volume-group-id:" + volumeGroupId + " volume-group-name:" + volumeGroupName); - Response response = null; + Response response; if (vnfType != null) { response = this.getRequestList ("vnfType", vnfType, version); } else { @@ -233,7 +233,7 @@ public class VolumeInfoHandler { getMsoLogger ().debug ("getRequest: " + requestId); - String responseString = null; + String responseString; InfraActiveRequests activeReq = (RequestsDatabase.getInstance()).getRequestFromInfraActive (requestId, "VOLUME"); @@ -257,7 +257,7 @@ public class VolumeInfoHandler { queryValue, "VOLUME"); - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); if (activeReqList != null) { // build response for active @@ -302,7 +302,7 @@ public class VolumeInfoHandler { } private List infraRequestsResponses (List arList, String version) { - List queryResponseList = new LinkedList (); + List queryResponseList = new LinkedList <> (); for (InfraRequests ar : arList) { VolumeRequest qr = fillGeneric (ar); -- cgit 1.2.3-korg