aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrama-huawei <rama.subba.reddy.s@huawei.com>2017-09-25 18:57:57 +0530
committerrama-huawei <rama.subba.reddy.s@huawei.com>2017-09-28 11:43:25 +0530
commit78a3b140d29c1d96a353899fa7d8a70360e5a2b7 (patch)
treeb33d3402898a1eeee010a0ad7de2ea30890a446c
parent00f6a9c613096e3d4623b8e8486992be727d92da (diff)
Removed useless assignment to local variables
Issue-Id:SO-118 Change-Id: I29ec088aa52073f4e9df5503ede9f306c72e41d0 Signed-off-by: rama-huawei <rama.subba.reddy.s@huawei.com>
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java4
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java5
-rw-r--r--mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java8
3 files changed, 10 insertions, 7 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
index 353246f576..b498259eed 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/openecomp/mso/apihandler/common/XMLValidator.java
@@ -65,7 +65,7 @@ public class XMLValidator {
stringXsd = IOUtils.toString (xsdStream);
factory = SchemaFactory.newInstance (XMLConstants.W3C_XML_SCHEMA_NS_URI);
- factory.setResourceResolver ((new PathResourceResolver (XSDS_PATH)));
+ factory.setResourceResolver (new PathResourceResolver (XSDS_PATH));
factory.setFeature (XMLConstants.FEATURE_SECURE_PROCESSING, true);
String quotedXsd = stringXsd.replaceAll ("&#34;", "\"");
@@ -90,7 +90,7 @@ public class XMLValidator {
} catch (IOException | SAXException e) {
msoLogger.debug ("Exception: ", e);
- return ("ErrorDetails: " + e.getMessage ());
+ return "ErrorDetails: " + e.getMessage ();
} catch (Exception e) {
msoLogger.error (MessageEnum.APIH_CANNOT_READ_SCHEMA, "", "", MsoLogger.ErrorCode.SchemaError, "APIH cannot read schema file", e);
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
index 0f39ad07b6..91bf2df48c 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/Messages.java
@@ -28,7 +28,7 @@ import org.openecomp.mso.apihandler.common.ErrorNumbers;
public class Messages {
- public static final Map<String,String> errors = new HashMap<String,String>();
+ public static final Map<String,String> errors = new HashMap<>();
static {
errors.put(ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION + "_service", "Service request FAILED schema validation. %s");
errors.put(ErrorNumbers.REQUEST_FAILED_SCHEMA_VALIDATION + "_feature", "Feature request FAILED schema validation. %s");
@@ -46,4 +46,7 @@ public class Messages {
errors.put(ErrorNumbers.NO_COMMUNICATION_TO_CATALOG_DB, "Could not communicate with MSO_CATALOG DB %s");
errors.put(ErrorNumbers.ERROR_FROM_CATALOG_DB, "Received error from MSO_CATALOG DB %s");
}
+
+ private Messages(){
+ }
}
diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
index f61a50bb06..bcea8fd8d5 100644
--- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
+++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/NetworkInfoHandler.java
@@ -85,7 +85,7 @@ public class NetworkInfoHandler {
+ aicNodeClli
+ " - tenant id "
+ tenantId);
- Response response = null;
+ Response response;
if (networkType != null) {
response = this.getRequestList ("vnfType", networkType, version);
} else {
@@ -216,7 +216,7 @@ public class NetworkInfoHandler {
MsoLogger.setLogContext (requestId, null);
getMsoLogger ().debug ("getRequest: " + requestId);
- String responseString = null;
+ String responseString;
InfraActiveRequests activeReq = (RequestsDatabase.getInstance()).getRequestFromInfraActive (requestId, "NETWORK");
if (activeReq != null) {
@@ -239,7 +239,7 @@ public class NetworkInfoHandler {
queryValue,
"NETWORK");
- List <NetworkRequest> queryResponseList = new LinkedList <NetworkRequest> ();
+ List <NetworkRequest> queryResponseList = new LinkedList <> ();
if (activeReqList != null) {
// build response for active
@@ -283,7 +283,7 @@ public class NetworkInfoHandler {
}
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);