From 9a048424d3273152b02aafff690b8a420eae17e4 Mon Sep 17 00:00:00 2001 From: Jonas Herzig Date: Fri, 12 Nov 2021 11:05:14 +0100 Subject: Fix inject method in constant being duplicated if remapped twice --- src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/kotlin/com/replaymod/gradle') diff --git a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt index bcade7e..edb867c 100644 --- a/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt +++ b/src/main/kotlin/com/replaymod/gradle/remap/PsiMapper.kt @@ -359,7 +359,7 @@ internal class PsiMapper( else -> "" } - if (mapped != literalValue) { + if (mapped != literalValue && valid(literalExpr)) { replace(literalExpr, '"'.toString() + mapped + '"'.toString()) } } -- cgit