diff options
author | zaaarf <zaaarf@proton.me> | 2023-03-15 11:41:42 +0100 |
---|---|---|
committer | zaaarf <zaaarf@proton.me> | 2023-03-15 11:41:42 +0100 |
commit | c46106bebafeaf6d61a68577b6ebd65c00c836bf (patch) | |
tree | 65c30ea646e92a638ff11e95a00c7e549e9911e5 /src | |
parent | 19b739943fabeed97d6d6a2bc4e70e7d832fea49 (diff) |
fix: now the mapper automagically converts internal names to FQN
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java b/src/main/java/ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java index 1d19c6b..12ae23f 100644 --- a/src/main/java/ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java +++ b/src/main/java/ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java @@ -52,7 +52,7 @@ public class ObfuscationMapper { * @throws MappingNotFoundException if no mapping is found */ public String obfuscateClass(String name) { - ObfuscationData data = mapper.get(name); + ObfuscationData data = mapper.get(name.replace('.', '/')); if(data == null) throw new MappingNotFoundException(name); else return data.obf; @@ -80,10 +80,13 @@ public class ObfuscationMapper { * @throws MappingNotFoundException if no mapping is found */ public String obfuscateMember(String parentName, String memberName) { - ObfuscationData data = mapper.get(parentName); + ObfuscationData data = mapper.get(parentName.replace('.', '/')); if(data == null) throw new MappingNotFoundException(parentName + "::" + memberName); - return data.members.get(memberName); + String member = data.members.get(memberName); + if(member == null) + throw new MappingNotFoundException(parentName + "::" + memberName); + return member; } /** |