From 5db2235f83ae0087c0f0a8ba0e6c3792d68e6bea Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Sat, 25 May 2019 18:47:19 +0200 Subject: Fix overridden super-super-class methods with no mappings for super class E.g. A extends B extends C where only C has declared mappings will prematurely stop searching for C-methods overridden in A because there are no mappings for B --- .../java/com/replaymod/gradle/remap/Transformer.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/replaymod/gradle/remap/Transformer.java b/src/main/java/com/replaymod/gradle/remap/Transformer.java index de81501..e41867f 100644 --- a/src/main/java/com/replaymod/gradle/remap/Transformer.java +++ b/src/main/java/com/replaymod/gradle/remap/Transformer.java @@ -520,17 +520,18 @@ class Transformer { } mapping = null; } - - ITypeBinding superClass = declaringClass.getSuperclass(); - if (superClass != null) { - parentQueue.offer(superClass); - } - for (ITypeBinding anInterface : declaringClass.getInterfaces()) { - parentQueue.offer(anInterface); - } while (mapping == null) { declaringClass = parentQueue.poll(); if (declaringClass == null) return true; + + ITypeBinding superClass = declaringClass.getSuperclass(); + if (superClass != null) { + parentQueue.offer(superClass); + } + for (ITypeBinding anInterface : declaringClass.getInterfaces()) { + parentQueue.offer(anInterface); + } + name = stripGenerics(declaringClass.getQualifiedName()); if (name.isEmpty()) continue; mapping = map.get(name); -- cgit