Deleted redundant code 03/15003/1
authorshashikanth <shashikanth.vh@huawei.com>
Mon, 25 Sep 2017 09:32:23 +0000 (15:02 +0530)
committershashikanth <shashikanth.vh@huawei.com>
Mon, 25 Sep 2017 09:32:24 +0000 (15:02 +0530)
Remove this return statement from this finally block
https://sonar.onap.org/component_issues?id=org.openecomp.so%3Aso#resolved=false|severities=BLOCKER

Issue-Id:SO-118
Change-Id: I6933ec089e6030d5fd5495b37f4d785b0935341b
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/serviceTask/AbstractSdncVlOperationTask.java

index 8b26d01..212711e 100644 (file)
@@ -89,23 +89,21 @@ public abstract class AbstractSdncVlOperationTask extends BaseTask {
         } catch (Exception e) {
             System.out.println(e);
             logger.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString());
-        } finally {
-            return defaultValue;
         }
+        return defaultValue;
     }
 
     private Integer getInteger(DelegateExecution execution, String name, Integer defaultValue) {
         Integer vlaue = (Integer) execution.getVariable(name);
         try {
-            if (vlaue != null && vlaue instanceof Integer) {
+            if (vlaue != null) {
                 return vlaue;
             }
         } catch (Exception e) {
             System.out.println(e);
             logger.error(MessageEnum.GENERAL_EXCEPTION, " getMsbIp catch exception: ", "", this.getTaskName(), MsoLogger.ErrorCode.UnknownError, e.getClass().toString());
-        } finally {
-            return defaultValue;
         }
+        return defaultValue;
     }
 
     public String getProcessKey(DelegateExecution execution) {