Fix broken CSIT 52/103152/2
authorvasraz <vasyl.razinkov@est.tech>
Thu, 5 Mar 2020 16:28:03 +0000 (16:28 +0000)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Thu, 5 Mar 2020 16:29:57 +0000 (16:29 +0000)
Change-Id: I92785294ef0e49477e8c33e30285b7d5978910a9
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech>
Issue-ID: SDC-2759

common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java

index 756670c..92f633d 100644 (file)
@@ -147,7 +147,8 @@ public class YamlToObjectConverter {
        }
 
        public <T> T convert(String fullFileName, Class<T> className) throws YamlConversionException {
-               if (!new File(fullFileName).exists()) {
+               final File file = new File(fullFileName);
+               if (!file.exists() || file.isDirectory()) {
                        log.warn(EcompLoggerErrorCode.UNKNOWN_ERROR,"","",
                                "The file {} cannot be found. Ignore reading configuration.", fullFileName);
                        return null;