From 4f1b3658b46415979b3f6edb45bc746abfe926d6 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Wed, 1 May 2019 12:37:08 +0200 Subject: Fix remapping of overridden methods in anonymous classes --- src/main/java/com/replaymod/gradle/remap/Transformer.java | 9 ++++++--- 1 file 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 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()); -- cgit