Skip to content

Commit

Permalink
code optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
wormchen authored and johnsonlee committed Jun 24, 2020
1 parent 9fd2e8a commit 2d0e1c4
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ class ThreadTransformer : ClassTransformer {
(it.opcode == Opcodes.INVOKESPECIAL) &&
(it is MethodInsnNode) &&
(this.desc == it.owner && "<init>" == it.name)
}?.let { init ->
if (init !is MethodInsnNode) return
}?.isInstanceOf { init: MethodInsnNode ->
val name = "new${prefix.capitalize()}${this.desc.substringAfterLast('/')}"
val desc = "${init.desc.substringBeforeLast(')')}Ljava/lang/String;)L${this.desc};"
logger.println(" * ${init.owner}.${init.name}${init.desc} => $type.$name$desc: ${klass.name}.${method.name}${method.desc}")
Expand Down

0 comments on commit 2d0e1c4

Please sign in to comment.