diff options
author | sharath reddy <bs.reddy@huawei.com> | 2022-03-18 20:11:27 +0530 |
---|---|---|
committer | sharath reddy <bs.reddy@huawei.com> | 2022-03-22 12:23:56 +0530 |
commit | 9df5c4d3e3e7b72b54de212a4a97ef18e5930948 (patch) | |
tree | 73afa3942fbc09f4c98b1cc57edc2b11d06213e1 /framework/src/main/java | |
parent | 3a40008342681bfdbd5ac73ac1b4b6a85c7fd8eb (diff) |
Fixed Sonar Bugs & Vulnerabilities
Issue-ID: CLI-439
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Change-Id: Icbe3d40286d15b8b3639af7a7eb6c4e189169a3f
Signed-off-by: sharath reddy <bs.reddy@huawei.com>
Diffstat (limited to 'framework/src/main/java')
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java | 2 | ||||
-rw-r--r-- | framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java index 8f998190..e72327fe 100644 --- a/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java +++ b/framework/src/main/java/org/onap/cli/fw/store/OnapCommandExecutionStore.java @@ -415,7 +415,7 @@ public class OnapCommandExecutionStore { for (String dir: dirs) { list.add(this.makeExecution(dir)); } - } catch (Exception e) { + } catch (Exception e) {// NOSONAR throw new OnapCommandExecutionFailed(e, "Failed to search the executions"); } diff --git a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java index 53cea2b6..af3a0e43 100644 --- a/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java +++ b/framework/src/main/java/org/onap/cli/fw/utils/OnapCommandDiscoveryUtils.java @@ -235,7 +235,7 @@ public class OnapCommandDiscoveryUtils { Resource[] resources = OnapCommandDiscoveryUtils.findResources(pattern); if (resources != null && resources.length > 0) { //NOSONAR for (Resource res : resources) { - if (res.getFilename().equals(fileName)) { + if ((res.getFilename() != null) && (res.getFilename().equals(fileName))) { return res; } } |