Minor, remove obsolete JDK 6-related workaround

This commit is contained in:
Alexander Udalov
2018-02-14 12:50:16 +01:00
parent 60a551404a
commit ecc441a642
@@ -33,16 +33,11 @@ task("prepare") {
fun loadAllFromJar(file: File): Map<String, Pair<JarEntry, ByteArray>> {
val result = hashMapOf<String, Pair<JarEntry, ByteArray>>()
val jar = JarFile(file)
try {
JarFile(file).use { jar ->
for (jarEntry in jar.entries()) {
result[jarEntry.name] = Pair(jarEntry, jar.getInputStream(jarEntry).readBytes())
}
}
finally {
// Yes, JarFile does not extend Closeable on JDK 6 so we can't use "use" here
jar.close()
}
return result
}