aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-core-lib
diff options
context:
space:
mode:
authortalio <tali.orenbach@amdocs.com>2017-10-25 11:25:29 +0300
committertalio <tali.orenbach@amdocs.com>2017-10-25 11:25:29 +0300
commit4a8b03f2ed94e0d7048aeca6346ec65f0c282192 (patch)
tree55038ad10255b3155233cc9ed35c55ccce4ba3f1 /openecomp-be/lib/openecomp-core-lib
parent26ffac7f0f508f73a1b0701bc3897d0259409a35 (diff)
upload
enable upload for files with extension in uppercase, while not saving the extension in lowercase in the DB Issue - Id : SDC-526 Change-Id: I42baa128d533937f0b257df9f174230f21676b12 Signed-off-by: talio <tali.orenbach@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib')
-rw-r--r--openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java
index 04e64c33a9..85fe305060 100644
--- a/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java
+++ b/openecomp-be/lib/openecomp-core-lib/openecomp-utilities-lib/src/main/java/org/openecomp/core/utilities/orchestration/OnboardingTypesEnum.java
@@ -20,13 +20,11 @@ public enum OnboardingTypesEnum {
if (inStr == null) {
return null;
}
+
Optional<OnboardingTypesEnum> onboardingTypesOptional = asList(OnboardingTypesEnum.values()).stream()
- .filter(onboardingTypesEnum -> onboardingTypesEnum.toString().equals(inStr)).findAny();
- if( onboardingTypesOptional.isPresent()){
- return onboardingTypesOptional.get();
- }else {
- return null;
- }
+ .filter(onboardingTypesEnum -> onboardingTypesEnum.toString().equals(inStr.toLowerCase()))
+ .findAny();
+ return onboardingTypesOptional.orElse(null);
}
}