summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-03-07 18:45:32 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-07 18:45:32 +0000
commit4fb6ea33d4dc04730c171f55cedfe62b56ac5484 (patch)
treefa2d0257f12e334b9fd8a5ed83efb5f9f83752de
parent61b1d1cdd962f95015add112c54c25a7f998079c (diff)
parent8a6c06a549e753cbac8341aef3e23f2f4b4f3fe2 (diff)
Merge "Remove redundant catch clause"
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java2
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java2
-rw-r--r--adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java7
-rw-r--r--adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java7
-rw-r--r--adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java6
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java6
7 files changed, 2 insertions, 30 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index c438d0a277..699bd7c684 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -1240,8 +1240,6 @@ public class MsoHeatUtils extends MsoCommonUtils {
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
index f7e67d87f8..75bb00351c 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
@@ -428,8 +428,6 @@ public class MsoHeatUtilsWithUpdate extends MsoHeatUtils {
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(), jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(), e);
}
diff --git a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
index be0466af73..fa257164cf 100644
--- a/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
+++ b/adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
@@ -154,12 +154,7 @@ public abstract class SDNCConnector {
LOGGER.info(MessageEnum.RA_RESPONSE_FROM_SDNC, responseContent, "SDNC", "");
return createResponseFromContent(statusCode, statusMessage, responseContent, rt);
- } catch (SocketTimeoutException e) {
- String errMsg = "Request to SDNC timed out";
- logError(errMsg, e);
- return createErrorResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg, rt);
-
- } catch (ConnectTimeoutException e) {
+ } catch (SocketTimeoutException | ConnectTimeoutException e) {
String errMsg = "Request to SDNC timed out";
logError(errMsg, e);
return createErrorResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg, rt);
diff --git a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
index afee1bbfaa..fcbbf8515a 100644
--- a/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
+++ b/adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
@@ -166,12 +166,7 @@ public class RestfulUtil {
method = null;
return createResponse(statusCode, responseContent);
- } catch(SocketTimeoutException e) {
- String errMsg = "Request to VFC timed out";
- logError(errMsg, e);
- return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
-
- } catch(ConnectTimeoutException e) {
+ } catch(SocketTimeoutException | ConnectTimeoutException e) {
String errMsg = "Request to VFC timed out";
logError(errMsg, e);
return createResponse(HttpURLConnection.HTTP_CLIENT_TIMEOUT, errMsg);
diff --git a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
index caab1e31bc..9022c26ccd 100644
--- a/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
+++ b/adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
@@ -536,8 +536,6 @@ public class MsoVnfAdapterImpl implements MsoVnfAdapter {
final Object obj = JSON_MAPPER.treeToValue(node, Object.class);
final String json = JSON_MAPPER.writeValueAsString(obj);
return json;
- } catch (JsonParseException jpe) {
- LOGGER.debug("Error converting json to string " + jpe.getMessage(),jpe);
} catch (Exception e) {
LOGGER.debug("Error converting json to string " + e.getMessage(),e);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
index 4d895f3279..fbed36548e 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
@@ -92,10 +92,6 @@ public abstract class JsonWrapper implements Serializable {
JSONObject json = new JSONObject();
try {
json = new JSONObject(mapper.writeValueAsString(this));
- } catch (JsonGenerationException e) {
- LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (JSONException e) {
LOGGER.debug("Exception :",e);
} catch (IOException e) {
@@ -113,8 +109,6 @@ public abstract class JsonWrapper implements Serializable {
jsonString = mapper.writeValueAsString(list);
} catch (JsonGenerationException e) {
LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (IOException e) {
LOGGER.debug("Exception :",e);
}
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
index 967b1dfe1c..cfa5c853a3 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java
@@ -85,10 +85,6 @@ public abstract class JsonWrapper implements Serializable {
JSONObject json = new JSONObject();
try {
json = new JSONObject(mapper.writeValueAsString(this));
- } catch (JsonGenerationException e) {
- LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (JSONException e) {
LOGGER.debug("Exception :",e);
} catch (IOException e) {
@@ -106,8 +102,6 @@ public abstract class JsonWrapper implements Serializable {
jsonString = mapper.writeValueAsString(list);
} catch (JsonGenerationException e) {
LOGGER.debug("Exception :",e);
- } catch (JsonMappingException e) {
- LOGGER.debug("Exception :",e);
} catch (IOException e) {
LOGGER.debug("Exception :",e);
}