GetDefault is not thread safe
See original GitHub issueI get an exemption on return _default[fileType];
System.InvalidOperationException: ‘Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection’s state is no longer correct.’
I think this method should be thread safe.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Is Java's TimeZone thread-safe?
I looked once at the source code for it and came to a conclusion that it was not. Look at JodaTime timezone class....
Read more >[JDK-4808233] "Locale" not thread-safe - Java Bug System
java.util.Locale seems not to be thread safe, as I look at the source code. The static method getDefault() is not synchronized. The code...
Read more >[ICU-9737] locale::GetDefault() in locid.cpp is not thread-safe
This is a security bug reported against Chrome's copy of ICU (4.6.1), but it appears that ToT has the same problem as far...
Read more >Ensuring the thread-safety of the entire codebase : r/java
Thread safety is only a risk when you have shared mutable state. No shared mutable state, no thread safety risk. IMO, most of...
Read more >LocalizedBundle internal locale switch has no thread safety #137
Describe the bug LocalizedBundle switches to Locale.getDefault() when its changes, but this is not thread safe, because Locale.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sure thing, i’ll message back here if i get make some time sooner, thanks!
Added an issue to corefx so its easier to find in search https://github.com/dotnet/corefx/issues/31186