diff options
author | prakash.e@huawei.com <prakash.e@huawei.com> | 2022-04-10 20:28:12 +0530 |
---|---|---|
committer | prakash.e@huawei.com <prakash.e@huawei.com> | 2022-04-10 20:28:12 +0530 |
commit | d1cdc63f13a680a1c7438461c56e86f3580cfeb9 (patch) | |
tree | 2e9803f79523c60e4250a738e4c430214f9bd64c | |
parent | c981dd97fa2c22ec46647a69e180f2bd88c9e7d2 (diff) |
vnfsdk validation code refactoring in method createDirectory
https://sonarcloud.io/project/issues?resolved=false&severities=BLOCKER&types=VULNERABILITY&id=onap_vnfsdk-validation&open=AXk4ivruWcQzNZo7t49l
Issue-ID: VNFSDK-832
Signed-off-by: prakash.e@huawei.com <prakash.e@huawei.com>
Change-Id: Ib123d5f3648d81c3583119996ec7e50699f6cfec
-rw-r--r-- | csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java b/csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java index 45c8db1..07dece1 100644 --- a/csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java +++ b/csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java @@ -50,8 +50,12 @@ public final class FileUtil { int tryCount = 0; while (tryCount < TRY_COUNT) { tryCount++; - if (folder.exists() || folder.mkdirs()) { + if (folder.exists()) { return true; + } else { + if (folder.mkdirs()) { + return true; + } } } |