r/java
•
u/loicmathieu
•
Jul 23 '26
•
1
JEP 540: Simple JSON API (Incubator)
https://openjdk.org/jeps/540
79
Upvotes
View all comments
Show parent comment
1
u/Eav___ Jul 26 '26 edited Jul 26 '26
This is my point.
No matter how hard you try to validate beforehand, if you think concurrency is a problem in
Files.exist, then it's also a problem here. You can totally break assumptions you've made during the validation with concurrency and produce ill-formed structured data, which would result in an exception, and by your point this should be checked.