Cleanup: apply "Use synthetic property access syntax"
This commit is contained in:
@@ -35,7 +35,7 @@ fun main(args: Array<String>) {
|
||||
val jar = JarFile(file)
|
||||
try {
|
||||
for (jarEntry in jar.entries()) {
|
||||
result[jarEntry.getName()] = Pair(jarEntry, jar.getInputStream(jarEntry).readBytes())
|
||||
result[jarEntry.name] = Pair(jarEntry, jar.getInputStream(jarEntry).readBytes())
|
||||
}
|
||||
}
|
||||
finally {
|
||||
|
||||
@@ -50,7 +50,7 @@ fun loadVersions(library: File): String {
|
||||
val jarFile = JarFile(library)
|
||||
try {
|
||||
for (entry in jarFile.entries()) {
|
||||
if (entry.getName().endsWith(".class")) {
|
||||
if (entry.name.endsWith(".class")) {
|
||||
val classBytes = jarFile.getInputStream(entry).readBytes()
|
||||
loadClassVersions(classBytes)?.let {
|
||||
val (metadata, bytecode) = it
|
||||
|
||||
@@ -68,13 +68,13 @@ fun main(args: Array<String>) {
|
||||
try {
|
||||
for (entry in inJar.entries()) {
|
||||
val inBytes = inJar.getInputStream(entry).readBytes()
|
||||
val outBytes = transform(entry.getName(), inBytes)
|
||||
val outBytes = transform(entry.name, inBytes)
|
||||
|
||||
if (inBytes.size < outBytes.size) {
|
||||
error("Size increased for ${entry.getName()}: was ${inBytes.size} bytes, became ${outBytes.size} bytes")
|
||||
error("Size increased for ${entry.name}: was ${inBytes.size} bytes, became ${outBytes.size} bytes")
|
||||
}
|
||||
|
||||
entry.setCompressedSize(-1L)
|
||||
entry.compressedSize = -1L
|
||||
outJar.putNextEntry(entry)
|
||||
outJar.write(outBytes)
|
||||
outJar.closeEntry()
|
||||
|
||||
Reference in New Issue
Block a user