diff options
Diffstat (limited to 'common-app-api/src/main/java')
-rw-r--r-- | common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java b/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java index 756670c54a..92f633dcd1 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/util/YamlToObjectConverter.java @@ -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; |