JSONObject json = new JSONObject();\r
try {\r
json = new JSONObject(mapper.writeValueAsString(this));\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
String jsonString = "";\r
try {\r
jsonString = mapper.writeValueAsString(list);\r
- } catch (JsonGenerationException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
LOGGER.debug("Exception :",e);\r
}\r
JSONObject json = new JSONObject();\r
try {\r
json = new JSONObject(mapper.writeValueAsString(this));\r
- } catch (JSONException e) {\r
+ } catch (JSONException | IOException e) {\r
LOGGER.debug("Exception :",e);\r
- } catch (IOException e) {\r
- LOGGER.debug("Exception :",e);\r
- } \r
- return json; \r
+ }\r
+ return json;\r
}\r
\r
public String listToJson(List list) {\r
String jsonString = "";\r
try {\r
jsonString = mapper.writeValueAsString(list);\r
- } catch (JsonGenerationException e) {\r
- LOGGER.debug("Exception :",e);\r
} catch (IOException e) {\r
LOGGER.debug("Exception :",e);\r
}\r