Improve FilesystemSchemaSourceCache mkdirs handling 93/72793/1
authorTom Pantelis <tompantelis@gmail.com>
Fri, 8 Jun 2018 13:34:19 +0000 (09:34 -0400)
committerTom Pantelis <tompantelis@gmail.com>
Fri, 8 Jun 2018 13:37:22 +0000 (09:37 -0400)
commit6e1d563831124db6b87dc50d543187f6b18224f1
tree6d190c06b0479ab2f2c8b0d7d05732bb04dd769c
parent1636eaae9a133d79301b7ebb02ae8d6a5fc38117
Improve FilesystemSchemaSourceCache mkdirs handling

mkdirs returns false if the directory already exists. Although
it check exists prior to mkdirs, it's possible for the dir to be
created by another thread in between the calls so make it robust
by checking isDirectory (which also checks exists) if mkdirs returns
false.

Change-Id: If63a2d20400c3093f0aea4c22192fa0e01fde748
Signed-off-by: Tom Pantelis <tompantelis@gmail.com>
yang/yang-model-util/src/main/java/org/opendaylight/yangtools/yang/model/repo/util/FilesystemSchemaSourceCache.java