Commit 7fb0cef9 authored by imoustakas's avatar imoustakas

Fix Null pointer Exception

parent 85708a4a
......@@ -150,7 +150,8 @@ object ConfigUtils extends Logging {
def yamlToMap(file: File): Map[String, Any] = {
val yaml = new Yaml()
val a = yaml.load(scala.io.Source.fromFile(file).reader())
ConfigUtils.any2map(a)
if (a == null) throw new IllegalStateException(s"File '$file' is an empty file")
else ConfigUtils.any2map(a)
}
/** Convert json to native scala map/values */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment