refactor: only compute maxs and use existing stack frames

This commit is contained in:
Lucaskyy 2022-03-24 19:45:13 +01:00 committed by oSumAtrIX
parent be992a3e6f
commit b197956e39
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -79,10 +79,7 @@ internal class Io(
jos.putNextEntry(JarEntry(name))
// parse the patched class to a byte array and write it to the output stream
val cw = ClassWriter(
classReaders[name]!!,
ClassWriter.COMPUTE_FRAMES or ClassWriter.COMPUTE_MAXS
)
val cw = ClassWriter(classReaders[name]!!, ClassWriter.COMPUTE_MAXS)
patchedClass.accept(cw)
jos.write(cw.toByteArray())