From 86fe02f32d9b72263263aeb94eed62f5ef140c99 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 26 Dec 2019 20:51:17 +0000 Subject: [PATCH] Remove @JvmStatic annotations We only need to keep it on the main() methods for the moment. --- asm/src/main/java/dev/openrs2/asm/InsnMatcher.kt | 1 - asm/src/main/java/dev/openrs2/asm/classpath/Library.kt | 2 -- asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt | 1 - deob/src/main/java/dev/openrs2/deob/SignedClassUtils.kt | 1 - deob/src/main/java/dev/openrs2/deob/remap/PrefixRemapper.kt | 1 - 5 files changed, 6 deletions(-) diff --git a/asm/src/main/java/dev/openrs2/asm/InsnMatcher.kt b/asm/src/main/java/dev/openrs2/asm/InsnMatcher.kt index 9df865a683..ba70037912 100644 --- a/asm/src/main/java/dev/openrs2/asm/InsnMatcher.kt +++ b/asm/src/main/java/dev/openrs2/asm/InsnMatcher.kt @@ -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() diff --git a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt index 3e05ea3ac9..8553fcdae2 100644 --- a/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt +++ b/asm/src/main/java/dev/openrs2/asm/classpath/Library.kt @@ -119,7 +119,6 @@ class Library constructor() : Iterable { private const val JAR_SUFFIX = ".jar" private val GZIP_HEADER = byteArrayOf(0x1F, 0x8B.toByte()) - @JvmStatic fun readJar(path: Path): Library { logger.info { "Reading jar $path" } @@ -145,7 +144,6 @@ class Library constructor() : Iterable { return library } - @JvmStatic fun readPack(path: Path): Library { logger.info { "Reading pack $path" } diff --git a/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt b/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt index 3daf74854c..ee80e2975e 100644 --- a/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt +++ b/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt @@ -22,7 +22,6 @@ object ClassForNameRemapper { && invokestatic.desc == "(Ljava/lang/String;)Ljava/lang/Class;" } - @JvmStatic fun remap(remapper: Remapper, method: MethodNode) { INVOKE_MATCHER.match(method).filter(ClassForNameRemapper::isClassForName).forEach { val ldc = it[0] as LdcInsnNode diff --git a/deob/src/main/java/dev/openrs2/deob/SignedClassUtils.kt b/deob/src/main/java/dev/openrs2/deob/SignedClassUtils.kt index 2eb07b00d7..c4c9e71049 100644 --- a/deob/src/main/java/dev/openrs2/deob/SignedClassUtils.kt +++ b/deob/src/main/java/dev/openrs2/deob/SignedClassUtils.kt @@ -15,7 +15,6 @@ object SignedClassUtils { private val LOAD_SIGNED_CLASS_MATCHER = InsnMatcher.compile("LDC INVOKESTATIC ASTORE ALOAD GETFIELD ALOAD INVOKEVIRTUAL ALOAD INVOKEVIRTUAL POP") - @JvmStatic fun move(loader: Library, client: Library, signLink: Library) { // find signed classes val signedClasses = findSignedClasses(loader) diff --git a/deob/src/main/java/dev/openrs2/deob/remap/PrefixRemapper.kt b/deob/src/main/java/dev/openrs2/deob/remap/PrefixRemapper.kt index a6d8978e0f..41c4c35a6a 100644 --- a/deob/src/main/java/dev/openrs2/deob/remap/PrefixRemapper.kt +++ b/deob/src/main/java/dev/openrs2/deob/remap/PrefixRemapper.kt @@ -5,7 +5,6 @@ import org.objectweb.asm.commons.Remapper import org.objectweb.asm.commons.SimpleRemapper object PrefixRemapper { - @JvmStatic fun create(library: Library, prefix: String): Remapper { val mapping = mutableMapOf()