diff options
author | Jonas Herzig <me@johni0702.de> | 2019-05-01 12:57:16 +0200 |
---|---|---|
committer | Jonas Herzig <me@johni0702.de> | 2019-05-01 15:49:31 +0200 |
commit | 0da1aaeb4ff35a96648fe93b1a250392ced615eb (patch) | |
tree | 88e94092cb37c017a8c862daae8fa804bb4c0501 | |
parent | 4f1b3658b46415979b3f6edb45bc746abfe926d6 (diff) | |
download | Remap-0da1aaeb4ff35a96648fe93b1a250392ced615eb.tar.gz Remap-0da1aaeb4ff35a96648fe93b1a250392ced615eb.tar.bz2 Remap-0da1aaeb4ff35a96648fe93b1a250392ced615eb.zip |
Stop manually remapping imported names
These should all be sufficiently covered by the other paths.
-rw-r--r-- | src/main/java/com/replaymod/gradle/remap/Transformer.java | 8 |
1 files changed, 1 insertions, 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<String, String> mappedImports = new HashMap<>(); Map<String, Mapping> 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())) { |