Skip to content

Commit

Permalink
Merge pull request #29 from disymayufei/main
Browse files Browse the repository at this point in the history
Fix: the mod may throw ConcurrentModificationException when try to read or write the size of the replay file
  • Loading branch information
senseiwells authored Apr 17, 2024
2 parents cbfde09 + fc0c5dc commit 2d6cc41
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import java.io.File
import java.io.OutputStream
import java.util.*
import java.util.concurrent.CompletableFuture
import java.util.concurrent.ConcurrentHashMap
import java.util.concurrent.Executor
import java.util.zip.ZipEntry
import java.util.zip.ZipFile
Expand All @@ -21,7 +22,7 @@ class SizedZipReplayFile(
out: File,
cache: File = File(out.parentFile, out.name + ".cache")
): ZipReplayFile(ReplayStudio(), input, out, cache) {
private val entries = HashMap<String, MutableLong>()
private val entries = ConcurrentHashMap<String, MutableLong>()

override fun write(entry: String): OutputStream {
val mutable = MutableLong()
Expand Down

0 comments on commit 2d6cc41

Please sign in to comment.