Open Yrlec opened 4 years ago
Thank you for creating this great library!
I found a potential race condition on this line in KeyLocker: https://github.com/pilgr/Paper/blob/0e4e76ad7a9f30accbd6ba245166768cab39410d/paperdb/src/main/java/io/paperdb/KeyLocker.java#L29
One should use putIfAbsent instead. See https://stackoverflow.com/a/15850870/71354 for an explanation.
@Yrlec Good catch, thanks!
Thank you for creating this great library!
I found a potential race condition on this line in KeyLocker: https://github.com/pilgr/Paper/blob/0e4e76ad7a9f30accbd6ba245166768cab39410d/paperdb/src/main/java/io/paperdb/KeyLocker.java#L29
One should use putIfAbsent instead. See https://stackoverflow.com/a/15850870/71354 for an explanation.