diff options
author | Jonas Herzig <me@johni0702.de> | 2019-05-01 12:37:08 +0200 |
---|---|---|
committer | Jonas Herzig <me@johni0702.de> | 2019-05-01 15:49:31 +0200 |
commit | 4f1b3658b46415979b3f6edb45bc746abfe926d6 (patch) | |
tree | 761967e56c8b79d968ab608d2793325f51e78423 | |
parent | f973ead7a79e05c666d7bf5e2c5a754887c34bdd (diff) | |
download | Remap-4f1b3658b46415979b3f6edb45bc746abfe926d6.tar.gz Remap-4f1b3658b46415979b3f6edb45bc746abfe926d6.tar.bz2 Remap-4f1b3658b46415979b3f6edb45bc746abfe926d6.zip |
Fix remapping of overridden methods in anonymous classes
-rw-r--r-- | src/main/java/com/replaymod/gradle/remap/Transformer.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/replaymod/gradle/remap/Transformer.java b/src/main/java/com/replaymod/gradle/remap/Transformer.java index 78736d1..8fb641c 100644 --- a/src/main/java/com/replaymod/gradle/remap/Transformer.java +++ b/src/main/java/com/replaymod/gradle/remap/Transformer.java @@ -510,11 +510,14 @@ class Transformer { } else if (binding instanceof IMethodBinding) { ITypeBinding declaringClass = ((IMethodBinding) binding).getDeclaringClass(); if (declaringClass == null) return true; - String name = stripGenerics(declaringClass.getQualifiedName()); - if (name.isEmpty()) return true; - Mapping mapping = mixinMappings.get(name); ArrayDeque<ITypeBinding> parentQueue = new ArrayDeque<>(); parentQueue.offer(declaringClass); + Mapping mapping = null; + + String name = stripGenerics(declaringClass.getQualifiedName()); + if (!name.isEmpty()) { + mapping = mixinMappings.get(name); + } while (true) { if (mapping != null) { mapped = mapping.methods.get(node.getIdentifier()); |