Thread-safety of readLine was the first thing on my mind when I came across this post.
Digging in to the source yielded the following snippet from BufferedReader:
readLine in BufferedReader is thread-safe, so are most of the other methods in the class.
But nothing is mentioned in the API doc
Now the question is, how will developers get to know whether a method/class is thread-safe if it is not documented in API?
Developers will end up locking/unlocking un-necessarily which incurs a significant performance cost.
Can someone shed some light in this issue?