Commit 4561f688 authored by Peter van 't Hof's avatar Peter van 't Hof

Merge branch 'Fix-NullPointer' into 'develop'

Fix Null pointer Exception

BIOPET-418 fix null pointer exception

See merge request !484
parents 39070750 7fb0cef9
......@@ -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