Ignore non-jar files in ServiceLoaderLite (KT-29513)

This commit is contained in:
Yan Zhulanow
2019-01-31 15:43:51 +03:00
parent 15a316ff90
commit 0444203b9b
3 changed files with 9 additions and 2 deletions
@@ -71,7 +71,7 @@ object ServiceLoaderLite {
return when {
file.isDirectory -> findImplementationsInDirectory(classIdentifier, file)
file.isFile -> findImplementationsInJar(classIdentifier, file)
file.isFile && file.extension.toLowerCase() == "jar" -> findImplementationsInJar(classIdentifier, file)
else -> emptySet()
}
}