From 4cc83e6316ef533f1ca3650f35362a78d63067ad Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 27 Aug 2022 09:46:40 +0100 Subject: [PATCH] Mark all methods in a final class as non-final Marking the individual methods as final is redundant and IDEA warns about it. Signed-off-by: Graham --- .../openrs2/deob/bytecode/transform/FinalMethodTransformer.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalMethodTransformer.kt b/deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalMethodTransformer.kt index 1d5fce24b3..4bf46df2bc 100644 --- a/deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalMethodTransformer.kt +++ b/deob-bytecode/src/main/kotlin/org/openrs2/deob/bytecode/transform/FinalMethodTransformer.kt @@ -22,7 +22,9 @@ public class FinalMethodTransformer : Transformer() { } private fun isMethodFinal(classPath: ClassPath, clazz: ClassNode, method: MethodNode): Boolean { - if (method.name == "") { + if ((clazz.access and Opcodes.ACC_FINAL) != 0) { + return false + } else if (method.name == "") { return false } else if ((method.access and (Opcodes.ACC_ABSTRACT or Opcodes.ACC_PRIVATE or Opcodes.ACC_STATIC)) != 0) { return false