Remove the declaration of thrown exception 23/98023/2
authoranushadasari <danush10@in.ibm.com>
Wed, 6 Nov 2019 09:18:42 +0000 (14:48 +0530)
committerVikas Varma <vv8305@att.com>
Wed, 22 Jan 2020 15:28:09 +0000 (15:28 +0000)
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 <danush10@in.ibm.com>
cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CmsoServiceImpl.java
cmso-service/src/main/java/org/onap/optf/cmso/service/rs/CommonServiceImpl.java

index 8a1633a..70cee66 100644 (file)
@@ -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");
index e4dec7c..1bb4d0a 100644 (file)
@@ -213,7 +213,7 @@ public class CommonServiceImpl extends BaseSchedulerServiceImpl {
     }
 
     private void createChangeManagement(Schedule schedule, OptimizedScheduleMessage scheduleMessage,
-                    Map<String, List<ElementInfo>> groups) throws CmsoException {
+                    Map<String, List<ElementInfo>> 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<String, List<ElementInfo>> groups) throws CmsoException, JsonProcessingException {
+                    Map<String, List<ElementInfo>> 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<DomainData> marshallDomainData(OptimizedScheduleMessage scheduleMessage) throws CmsoException {
+    private List<DomainData> marshallDomainData(OptimizedScheduleMessage scheduleMessage) {
         List<NameValue> domainData = scheduleMessage.getCommonData();
         List<DomainData> domainDataList = new ArrayList<DomainData>();
         for (NameValue nameValue : domainData) {