aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
index a2be57a..3adc4f1 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt
@@ -339,14 +339,15 @@ internal class PsiMapper(
}}")
}
targetMethods.firstOrNull()
- } ?: continue
- val mappedName = findMapping(targetMethod)?.deobfuscatedName ?: continue
+ }
+ val mappedName = targetMethod?.let(::findMapping)?.deobfuscatedName ?: targetName
val ambiguousName = mapping.methodMappings.count { it.deobfuscatedName == mappedName } > 1
- val mapped = mappedName + if (ambiguousName) {
- remapMethodDesc(ClassUtil.getAsmMethodSignature(targetMethod))
- } else {
- ""
+ val mapped = mappedName + when {
+ ambiguousName && targetMethod != null ->
+ remapMethodDesc(ClassUtil.getAsmMethodSignature(targetMethod))
+ targetDesc != null -> remapMethodDesc(targetDesc)
+ else -> ""
}
if (mapped != literalValue) {