refactor: only compute maxs and use existing stack frames

This commit is contained in:
Lucaskyy 2022-03-24 19:45:13 +01:00
parent 51fb59a43c
commit c8a017a4c0
No known key found for this signature in database
GPG key ID: 1530BFF96D1EEB89

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())