From c46106bebafeaf6d61a68577b6ebd65c00c836bf Mon Sep 17 00:00:00 2001 From: zaaarf Date: Wed, 15 Mar 2023 11:41:42 +0100 Subject: fix: now the mapper automagically converts internal names to FQN --- .../ftbsc/lll/processor/tools/obfuscation/ObfuscationMapper.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/java/ftbsc/lll') 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; } /** -- cgit v1.2.3-56-ga3b1