From 0da1aaeb4ff35a96648fe93b1a250392ced615eb Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Wed, 1 May 2019 12:57:16 +0200 Subject: Stop manually remapping imported names These should all be sufficiently covered by the other paths. --- src/main/java/com/replaymod/gradle/remap/Transformer.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/main/java/com/replaymod/gradle/remap/Transformer.java b/src/main/java/com/replaymod/gradle/remap/Transformer.java index 8fb641c..de81501 100644 --- a/src/main/java/com/replaymod/gradle/remap/Transformer.java +++ b/src/main/java/com/replaymod/gradle/remap/Transformer.java @@ -389,7 +389,6 @@ class Transformer { private boolean remapClass(String unitName, CompilationUnit cu) { AtomicBoolean changed = new AtomicBoolean(false); - Map mappedImports = new HashMap<>(); Map mixinMappings = new HashMap<>(); cu.accept(new ASTVisitor() { @@ -445,11 +444,6 @@ class Transformer { if (mapped != null && !mapped.equals(name)) { node.setName(node.getAST().newName(mapped)); changed.set(true); - String simpleName = name.substring(name.lastIndexOf('.') + 1); - String simpleMapped = mapped.substring(mapped.lastIndexOf('.') + 1); - if (!simpleName.equals(simpleMapped)) { - mappedImports.put(simpleName, simpleMapped); - } } return false; } @@ -550,7 +544,7 @@ class Transformer { mapped = mapping.newName; mapped = mapped.substring(mapped.lastIndexOf('.') + 1); } else { - mapped = mappedImports.get(node.getIdentifier()); + return true; } if (mapped != null && !mapped.equals(node.getIdentifier())) { -- cgit