1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Warnings.

This commit is contained in:
Cedric Beust 2015-12-18 22:53:53 +04:00
parent 9a5fcd1e38
commit 7b603c76f4

View file

@ -38,7 +38,7 @@ public class JarUtils {
val path = spec.toString() val path = spec.toString()
spec.toFiles(directory + "/" + file.from).forEach { source -> spec.toFiles(directory + "/" + file.from).forEach { source ->
if (source.isDirectory) { if (source.isDirectory) {
log(2, "Writing contents of directory ${source}") log(2, "Writing contents of directory $source")
// Directory // Directory
var name = path var name = path
@ -56,7 +56,7 @@ public class JarUtils {
addSingleFile(".", includedFile, outputStream, expandJarFiles) addSingleFile(".", includedFile, outputStream, expandJarFiles)
} else { } else {
if (expandJarFiles and source.name.endsWith(".jar")) { if (expandJarFiles and source.name.endsWith(".jar")) {
log(2, "Writing contents of jar file ${source}") log(2, "Writing contents of jar file $source")
val stream = JarInputStream(FileInputStream(source)) val stream = JarInputStream(FileInputStream(source))
var entry = stream.nextEntry var entry = stream.nextEntry
while (entry != null) { while (entry != null) {
@ -72,7 +72,7 @@ public class JarUtils {
val fromPath = (file.from + "/" + source.path).replace("\\", "/") val fromPath = (file.from + "/" + source.path).replace("\\", "/")
val entryFile = File(directory, fromPath) val entryFile = File(directory, fromPath)
if (! entryFile.exists()) { if (! entryFile.exists()) {
throw AssertionError("File should exist: ${entryFile}") throw AssertionError("File should exist: $entryFile")
} }
addEntry(FileInputStream(entryFile), entry, outputStream, onError) addEntry(FileInputStream(entryFile), entry, outputStream, onError)
} }