aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/com/replaymod/gradle/remap
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/com/replaymod/gradle/remap')
-rw-r--r--src/main/kotlin/com/replaymod/gradle/remap/PsiPatterns.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiPatterns.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiPatterns.kt
index 3c095c4..a1f6e8b 100644
--- a/src/main/kotlin/com/replaymod/gradle/remap/PsiPatterns.kt
+++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiPatterns.kt
@@ -38,7 +38,8 @@ internal class PsiPatterns(private val annotationFQN: String) {
}
val replacementBody = replacementMethod.body!!
- if (method.text == replacementMethod.text) return
+ // If the body does not change, then there is no point in applying this pattern
+ if (body.text == replacementBody.text) return
// If either body is empty, then consider the pattern to be disabled
if (body.statements.isEmpty()) return