Code cleanup: several inspections applied

This commit is contained in:
Mikhail Glukhikh
2017-06-27 14:26:19 +03:00
committed by Mikhail Glukhikh
parent fdca96634e
commit 840847e47c
76 changed files with 121 additions and 147 deletions
@@ -51,7 +51,7 @@ internal fun ClassLoader.listAllUrlsAsFiles(): List<File> {
}
internal fun URLClassLoader.listLocalUrlsAsFiles(): List<File> {
return this.urLs.map { it.toString().removePrefix("file:") }.filterNotNull().map(::File)
return this.urLs.mapNotNull { it.toString().removePrefix("file:") }.map(::File)
}
internal fun <T : Any> List<T>.ensureNotEmpty(error: String): List<T> {