We only need to keep it on the main() methods for the moment.
@ -255,7 +255,6 @@ class InsnMatcher private constructor(private val regex: Regex) {
throw IllegalArgumentException("$opcode is not a valid opcode or opcode group")
}
@JvmStatic
fun compile(regex: String): InsnMatcher {
val pattern = StringBuilder()
val opcode = StringBuilder()
@ -119,7 +119,6 @@ class Library constructor() : Iterable<ClassNode> {
private const val JAR_SUFFIX = ".jar"
private val GZIP_HEADER = byteArrayOf(0x1F, 0x8B.toByte())
fun readJar(path: Path): Library {
logger.info { "Reading jar $path" }
@ -145,7 +144,6 @@ class Library constructor() : Iterable<ClassNode> {
return library
fun readPack(path: Path): Library {
logger.info { "Reading pack $path" }
@ -22,7 +22,6 @@ object ClassForNameRemapper {
&& invokestatic.desc == "(Ljava/lang/String;)Ljava/lang/Class;"
fun remap(remapper: Remapper, method: MethodNode) {
INVOKE_MATCHER.match(method).filter(ClassForNameRemapper::isClassForName).forEach {
val ldc = it[0] as LdcInsnNode
@ -15,7 +15,6 @@ object SignedClassUtils {
private val LOAD_SIGNED_CLASS_MATCHER =
InsnMatcher.compile("LDC INVOKESTATIC ASTORE ALOAD GETFIELD ALOAD INVOKEVIRTUAL ALOAD INVOKEVIRTUAL POP")
fun move(loader: Library, client: Library, signLink: Library) {
// find signed classes
val signedClasses = findSignedClasses(loader)
@ -5,7 +5,6 @@ import org.objectweb.asm.commons.Remapper
import org.objectweb.asm.commons.SimpleRemapper
object PrefixRemapper {
fun create(library: Library, prefix: String): Remapper {
val mapping = mutableMapOf<String, String>()