diff options
Diffstat (limited to 'adapters/mso-sdnc-adapter')
6 files changed, 11 insertions, 15 deletions
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java index c39b2f55d4..ff30e0d241 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/ObjectFactory.java @@ -47,6 +47,7 @@ public class ObjectFactory { * */ public ObjectFactory() { + /* Empty constructor */ } /** diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java index 6c54b9c11c..2ce452e51c 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/client/CallbackHeader.java @@ -66,6 +66,7 @@ public class CallbackHeader { protected String responseMessage; public CallbackHeader() { + /* Empty constructor */ } public CallbackHeader(String reqId, String respCode, String respMsg) { diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java index 4bab7773d7..830ac7c917 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/RequestTunables.java @@ -23,7 +23,6 @@ package org.openecomp.mso.adapters.sdnc.impl; import org.openecomp.mso.logger.MsoAlarmLogger; import org.openecomp.mso.logger.MsoLogger; -import org.openecomp.mso.properties.MsoJavaProperties; import org.openecomp.mso.properties.MsoPropertiesException; import org.openecomp.mso.properties.MsoPropertiesFactory; @@ -35,6 +34,7 @@ public class RequestTunables { private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA); private static MsoAlarmLogger alarmLogger = new MsoAlarmLogger(); public static final String MSO_PROP_SDNC_ADAPTER="MSO_PROP_SDNC_ADAPTER"; + public static final String GENERATED_KEY = "Generated key: "; //criteria private String reqId = ""; @@ -154,17 +154,17 @@ public class RequestTunables { public void setTunables() { String error = null; - String key = null; + String key; if ("query".equals(action)) { //due to variable format for operation eg services/layer3-service-list/8fe4ba4f-35cf-4d9b-a04a-fd3f5d4c5cc9 key = Constants.REQUEST_TUNABLES + "." + msoAction + ".." + action; - msoLogger.debug("Generated key: " + key); + msoLogger.debug(GENERATED_KEY + key); } else if ("put".equals(action) || "restdelete".equals(action)) { //due to variable format for operation eg services/layer3-service-list/8fe4ba4f-35cf-4d9b-a04a-fd3f5d4c5cc9 key = Constants.REQUEST_TUNABLES + "..." + action; - msoLogger.debug("Generated key: " + key); + msoLogger.debug(GENERATED_KEY + key); } else { key = Constants.REQUEST_TUNABLES + "." + msoAction + "." + operation +"." + action; - msoLogger.debug("Generated key: " + key); + msoLogger.debug(GENERATED_KEY + key); } String value; diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java index b4c37a0f30..c69aee52da 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCAdapterRestImpl.java @@ -53,7 +53,7 @@ import org.openecomp.mso.logger.MessageEnum; public class SDNCAdapterRestImpl { private MsoPropertiesFactory msoPropertiesFactory = new MsoPropertiesFactory(); - public final static String MSO_PROP_ADAPTER="MSO_PROP_SDNC_ADAPTER"; + public static final String MSO_PROP_ADAPTER = "MSO_PROP_SDNC_ADAPTER"; private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA); diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java index 757ea8207d..7473950063 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/impl/SDNCRestClient.java @@ -199,7 +199,7 @@ public class SDNCRestClient implements Runnable { //default sdncResp.setRespCode(HttpURLConnection.HTTP_INTERNAL_ERROR); String respMsg = "Error processing request to SDNC. "; - String sdncErrMsg = null; + String sdncErrMsg = ""; if (e instanceof java.net.SocketTimeoutException ) { @@ -264,9 +264,7 @@ public class SDNCRestClient implements Runnable { if (e.getMessage() != null) { respMsg = respMsg + e.getMessage(); } - if (sdncErrMsg != null) { - respMsg = respMsg + sdncErrMsg; - } + respMsg = respMsg + sdncErrMsg; sdncResp.setRespMsg(respMsg); diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/BPRestCallback.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/BPRestCallback.java index 0622c48c41..f6708a2586 100644 --- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/BPRestCallback.java +++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/BPRestCallback.java @@ -138,12 +138,7 @@ public class BPRestCallback { LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, msg); ALARMLOGGER.sendAlarm("MsoInternalError", MsoAlarmLogger.CRITICAL, msg); } - - httpResponse = null; } - - method.reset(); - method = null; return true; } catch (Exception e) { LOGGER.error(MessageEnum.RA_CALLBACK_BPEL_EXC, "Camunda", "", MsoLogger.ErrorCode.BusinessProcesssError, @@ -155,6 +150,7 @@ public class BPRestCallback { if (httpResponse != null) { try { EntityUtils.consume(httpResponse.getEntity()); + httpResponse = null; } catch (Exception e) { LOGGER.debug("Exception:", e); } |