From 51890c56b3d377aa13cde962ff37a63bd0643b30 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 8 Mar 2020 09:14:09 +0000 Subject: [PATCH] Track original constructor names and arguments too While it isn't useful for retaining the name of the constructor itself, as they don't really have names, it will be useful for tracking argument names and positions. Signed-off-by: Graham --- .../main/java/dev/openrs2/deob/annotation/OriginalMember.java | 2 +- .../java/dev/openrs2/deob/transform/OriginalNameTransformer.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java b/deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java index 8d392d70..9a3c88ce 100644 --- a/deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java +++ b/deob-annotations/src/main/java/dev/openrs2/deob/annotation/OriginalMember.java @@ -3,7 +3,7 @@ package dev.openrs2.deob.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Target; -@Target({ ElementType.FIELD, ElementType.METHOD }) +@Target({ ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD }) public @interface OriginalMember { String owner(); String name(); diff --git a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt index 63bc5029..1198b3bd 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/OriginalNameTransformer.kt @@ -40,7 +40,7 @@ class OriginalNameTransformer : Transformer() { clazz: ClassNode, method: MethodNode ): Boolean { - if (method.name == "" || method.name == "") { + if (method.name == "") { return false }