Skip to content

Commit 879052f

Browse files
Fix Compound#get not using lock
1 parent 7938bed commit 879052f

File tree

1 file changed

+1
-1
lines changed
  • cosmic-binary-format/src/main/kotlin/xyz/xenondevs/cbf

1 file changed

+1
-1
lines changed

cosmic-binary-format/src/main/kotlin/xyz/xenondevs/cbf/Compound.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class Compound private constructor(
310310
/**
311311
* Gets the value under [key] as [type] [T] or null if it doesn't exist.
312312
*/
313-
fun <T : Any> get(type: KType, key: String): T? {
313+
fun <T : Any> get(type: KType, key: String): T? = lock.withLock {
314314
return (entryMap[key] as CompoundEntry<T>?)?.get(type)
315315
}
316316

0 commit comments

Comments
 (0)