summaryrefslogtreecommitdiffstats
path: root/csarvalidation/src
diff options
context:
space:
mode:
authorprakash.e@huawei.com <prakash.e@huawei.com>2022-04-10 20:28:12 +0530
committerprakash.e@huawei.com <prakash.e@huawei.com>2022-04-10 20:28:12 +0530
commitd1cdc63f13a680a1c7438461c56e86f3580cfeb9 (patch)
tree2e9803f79523c60e4250a738e4c430214f9bd64c /csarvalidation/src
parentc981dd97fa2c22ec46647a69e180f2bd88c9e7d2 (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
Diffstat (limited to 'csarvalidation/src')
-rw-r--r--csarvalidation/src/main/java/org/onap/validation/csar/FileUtil.java6
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;
+ }
}
}