According to the documents it is indicated that the format is not thread safe.
Synchronization
Date formats are not synchronized. It is recommended that you create separate format instances for each stream. If several threads access the format at the same time, it must be synchronized from the outside.
Date format
How to read it? Unless you have an explicit guarantee that a method is thread safe (or is documented as unsafe), you cannot make any assumptions that it is safe.
However, if you really want to use only one method, which may be incompatible, you can always create an environment with high concurrency and check data integrity with and without synchronization.
I had a similar question with this, with Slate and RSA. The answer there shows one way to test the specific method of the Java Java class as a whole for this. Please note, however, that the implementation may change at any time, and by making your own implementation against the details of the implementation, and then the interface may cause some unpredictable problems in the future.
data integrity testing
source share