From acf8bb31c508954f94d5ccc921b28300b2033f21 Mon Sep 17 00:00:00 2001 From: anushadasari Date: Wed, 6 Nov 2019 14:48:42 +0530 Subject: Remove the declaration of thrown exception Remove the declaration of thrown exception 'com.fasterxml.jackson.databind.JsonMappingException' which is a subclass of 'java.io.IOException'. Remove the declaration of thrown exception 'org.onap.optf.cmso.common.exceptions.CmsoException', as it cannot be thrown from method's body Issue-ID: OPTFRA-632 Change-Id: If3645e1dbd53161280a192662fdea2ae75569fb5 Signed-off-by: anushadasari --- .../main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java | 4 ++-- .../main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'cmso-service') diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java index 8a1633a..70cee66 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java @@ -199,7 +199,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService { } private OptimizedScheduleMessage adaptScheduleMessage(CmsoMessage sm) - throws CmsoException, JsonParseException, JsonMappingException, IOException { + throws CmsoException, IOException { OptimizedScheduleMessage osm = new OptimizedScheduleMessage(); osm.setScheduleId(sm.getScheduleId()); osm.setDomain(sm.getDomain()); @@ -266,7 +266,7 @@ public class CmsoServiceImpl extends CommonServiceImpl implements CmsoService { } private Object getRequestFromCallbackData(String node, String value) - throws CmsoException, JsonParseException, JsonMappingException, IOException { + throws CmsoException, IOException { ObjectMapper om = new ObjectMapper(); JsonNode json = om.readValue(value, JsonNode.class); JsonNode details = json.get("requestDetails"); diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java index e4dec7c..1bb4d0a 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java @@ -213,7 +213,7 @@ public class CommonServiceImpl extends BaseSchedulerServiceImpl { } private void createChangeManagement(Schedule schedule, OptimizedScheduleMessage scheduleMessage, - Map> groups) throws CmsoException { + Map> groups){ SchedulingData schedulingInfo = scheduleMessage.getSchedulingData(); for (String groupId : groups.keySet()) { @@ -266,7 +266,7 @@ public class CommonServiceImpl extends BaseSchedulerServiceImpl { } private void createChangeManagementImmediate(Schedule schedule, OptimizedScheduleMessage scheduleMessage, - Map> groups) throws CmsoException, JsonProcessingException { + Map> groups){ SchedulingData schedulingInfo = scheduleMessage.getSchedulingData(); for (String groupId : groups.keySet()) { ChangeManagementGroup cmg = new ChangeManagementGroup(); @@ -324,7 +324,7 @@ public class CommonServiceImpl extends BaseSchedulerServiceImpl { // Marshall commonData into DB DomainData // No validation. // - private List marshallDomainData(OptimizedScheduleMessage scheduleMessage) throws CmsoException { + private List marshallDomainData(OptimizedScheduleMessage scheduleMessage) { List domainData = scheduleMessage.getCommonData(); List domainDataList = new ArrayList(); for (NameValue nameValue : domainData) { -- cgit 1.2.3-korg