Merge "Remove unneeded param type definition"
[so.git] / bpmn / MSOCoreBPMN / src / main / java / org / openecomp / mso / bpmn / core / domain / JsonWrapper.java
index ce66e06..5cd078d 100644 (file)
@@ -37,7 +37,7 @@ import com.fasterxml.jackson.databind.SerializationFeature;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;\r
 \r
 import org.openecomp.mso.logger.MsoLogger;\r
-//import org.codehaus.jackson.map.SerializationConfig.Feature;\r
+//import com.fasterxml.jackson.map.SerializationFeature;\r
 \r
 \r
 /**\r
@@ -84,24 +84,18 @@ public abstract class JsonWrapper implements Serializable  {
        public JSONObject toJsonObject(){\r
 \r
         ObjectMapper mapper = new ObjectMapper();\r
-       // mapper.configure(SerializationConfig.Feature.WRAP_ROOT_VALUE, true);\r
+       // mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
         //mapper.enable(SerializationFeature.WRAP_ROOT_VALUE);\r
 \r
         mapper.configure(SerializationFeature.WRAP_ROOT_VALUE, true);\r
-       // mapper.enable(org.codehaus.jackson.map.DeserializationConfig.Feature.UNWRAP_ROOT_VALUE);\r
+       // mapper.enable(com.fasterxml.jackson.map.DeserializationFeature.UNWRAP_ROOT_VALUE);\r
         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
+               } catch (JSONException | IOException e) {\r
                        LOGGER.debug("Exception :",e);\r
                }\r
-         return json; \r
+        return json;\r
        }\r
        \r
        public String listToJson(List list) {\r
@@ -111,10 +105,6 @@ public abstract class JsonWrapper implements Serializable  {
                String jsonString = "";\r
                try {\r
                        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
@@ -142,6 +132,7 @@ public abstract class JsonWrapper implements Serializable  {
        /**\r
         * Returns a string representation of this object.\r
         */\r
+        @Override\r
        public String toString() {\r
                return this.toJsonString();\r
        }\r