Skip to content

Commit 8804732

Browse files
CopilotGoooler
andcommitted
Use removePrefix instead of replace for multi-release prefix removal
Co-authored-by: Goooler <10363352+Goooler@users.noreply.github.com>
1 parent ec85ff7 commit 8804732

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/kotlin/com/github/jengelman/gradle/plugins/shadow/tasks/ShadowCopyAction.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ constructor(
177177
with(fileDetails) {
178178
// Temporarily remove the multi-release prefix.
179179
val multiReleasePrefix = multiReleaseRegex.find(path)?.value.orEmpty()
180-
val newPath = path.replace(multiReleasePrefix, "")
180+
val newPath = path.removePrefix(multiReleasePrefix)
181181
val relocatedPath = multiReleasePrefix + relocators.relocatePath(newPath)
182182
writeToZip(entryName = relocatedPath, bytes = remapClass(relocators = relocators))
183183
}

0 commit comments

Comments
 (0)