Merge "Remove redundant catch clause"
authorRob Daugherty <rd472p@att.com>
Wed, 7 Mar 2018 18:45:32 +0000 (18:45 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 7 Mar 2018 18:45:32 +0000 (18:45 +0000)
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtilsWithUpdate.java
adapters/mso-sdnc-adapter/src/main/java/org/openecomp/mso/adapters/sdnc/sdncrest/SDNCConnector.java
adapters/mso-vfc-adapter/src/main/java/org/openecomp/mso/adapters/vfc/util/RestfulUtil.java
adapters/mso-vnf-adapter/src/main/java/org/openecomp/mso/adapters/vnf/MsoVnfAdapterImpl.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/domain/JsonWrapper.java
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/json/JsonWrapper.java

index c438d0a..699bd7c 100644 (file)
@@ -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);
                }
index f7e67d8..75bb003 100644 (file)
@@ -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);
                }
index be0466a..fa25716 100644 (file)
@@ -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);
index afee1bb..fcbbf85 100644 (file)
@@ -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);
index caab1e3..9022c26 100644 (file)
@@ -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);
         }
index 4d895f3..fbed365 100644 (file)
@@ -92,10 +92,6 @@ public abstract class JsonWrapper implements Serializable  {
         JSONObject json = new JSONObject();\r
          try {\r
                        json = new JSONObject(mapper.writeValueAsString(this));\r
-               } catch (JsonGenerationException e) {\r
-                       LOGGER.debug("Exception :",e);\r
-               } catch (JsonMappingException e) {\r
-                       LOGGER.debug("Exception :",e);\r
                } catch (JSONException e) {\r
                        LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
@@ -113,8 +109,6 @@ public abstract class JsonWrapper implements Serializable  {
                        jsonString = mapper.writeValueAsString(list);\r
                } catch (JsonGenerationException e) {\r
                        LOGGER.debug("Exception :",e);\r
-               } catch (JsonMappingException e) {\r
-                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
                        LOGGER.debug("Exception :",e);\r
                }\r
index 967b1df..cfa5c85 100644 (file)
@@ -85,10 +85,6 @@ public abstract class JsonWrapper implements Serializable  {
         JSONObject json = new JSONObject();\r
          try {\r
                        json = new JSONObject(mapper.writeValueAsString(this));\r
-               } catch (JsonGenerationException e) {\r
-                       LOGGER.debug("Exception :",e);\r
-               } catch (JsonMappingException e) {\r
-                       LOGGER.debug("Exception :",e);\r
                } catch (JSONException e) {\r
                        LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
@@ -106,8 +102,6 @@ public abstract class JsonWrapper implements Serializable  {
                        jsonString = mapper.writeValueAsString(list);\r
                } catch (JsonGenerationException e) {\r
                        LOGGER.debug("Exception :",e);\r
-               } catch (JsonMappingException e) {\r
-                       LOGGER.debug("Exception :",e);\r
                } catch (IOException e) {\r
                        LOGGER.debug("Exception :",e);\r
                }\r