aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/legacy/LegacyMappingSetModelFactory.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/legacy/LegacyMappingSetModelFactory.kt b/src/main/kotlin/com/replaymod/gradle/remap/legacy/LegacyMappingSetModelFactory.kt
index 7737200..ec21546 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/legacy/LegacyMappingSetModelFactory.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/legacy/LegacyMappingSetModelFactory.kt
@@ -6,8 +6,7 @@ import org.cadixdev.lorenz.impl.MappingSetModelFactoryImpl
import org.cadixdev.lorenz.impl.model.TopLevelClassMappingImpl
import org.cadixdev.lorenz.model.MethodMapping
import org.cadixdev.lorenz.model.TopLevelClassMapping
-
-import java.util.Optional
+import java.util.*
class LegacyMappingSetModelFactory : MappingSetModelFactoryImpl() {
override fun createTopLevelClassMapping(parent: MappingSet, obfuscatedName: String, deobfuscatedName: String): TopLevelClassMapping {
@@ -23,7 +22,7 @@ class LegacyMappingSetModelFactory : MappingSetModelFactoryImpl() {
override fun getMethodMapping(signature: MethodSignature): Optional<MethodMapping> {
var maybeMapping = super.getMethodMapping(signature)
- if (!maybeMapping.isPresent || !maybeMapping.get().hasMappings()) {
+ if (!maybeMapping.isPresent || maybeMapping.get().let { it.signature == it.deobfuscatedSignature }) {
maybeMapping = super.getMethodMapping(stripDesc(signature))
}
return maybeMapping