aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2017-09-27 15:21:24 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-27 15:21:24 +0000
commitd291791666f3a903bbaea22462a3c358ebd606c1 (patch)
treea3538b35cd9a97aca2e18b81aa4118ac69c069a3 /mso-api-handlers
parent054840dc9033bb8eb3c12dba26d4ef5c6d4daabf (diff)
parente4b80e97a98f329af344da8d3c06423a5701a9e1 (diff)
Merge "Removed useless assignment to variables"
Diffstat (limited to 'mso-api-handlers')
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandler.java11
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/RequestActionMap.java2
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandler.java1
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VnfInfoHandler.java8
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/VolumeInfoHandler.java8
5 files changed, 14 insertions, 16 deletions
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 <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+ List <NetworkRequest> queryResponseList = new LinkedList <> ();
if (activeReqList != null) {
// build response for active
@@ -311,7 +311,7 @@ public class NetworkRequestHandler {
}
private List <NetworkRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
- List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+ List <NetworkRequest> 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<String, String> actionMap;
static {
- actionMap = new HashMap<String, String>();
+ 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 <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+ List <VnfRequest> queryResponseList = new LinkedList <> ();
if (activeReqList != null) {
// build response for active
@@ -320,7 +320,7 @@ public class VnfInfoHandler {
}
private List <VnfRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
- List <VnfRequest> queryResponseList = new LinkedList <VnfRequest> ();
+ List <VnfRequest> 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 <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+ List <VolumeRequest> queryResponseList = new LinkedList <> ();
if (activeReqList != null) {
// build response for active
@@ -302,7 +302,7 @@ public class VolumeInfoHandler {
}
private List <VolumeRequest> infraRequestsResponses (List <? extends InfraRequests> arList, String version) {
- List <VolumeRequest> queryResponseList = new LinkedList <VolumeRequest> ();
+ List <VolumeRequest> queryResponseList = new LinkedList <> ();
for (InfraRequests ar : arList) {
VolumeRequest qr = fillGeneric (ar);