Call to method of static java.text.DateFormat not advisable?

前端 未结 8 1801
失恋的感觉
失恋的感觉 2020-12-09 14:55

I am receiving a Find Bugs error - call to method of static java.text.DateFormat and I don\'t know the reason why it\'s not good / advisable to be

相关标签:
8条回答
  • 2020-12-09 15:20

    You can get this to go away by wrapping all the references to the DateFormat in a synchronize block - just make sure all calls are wrapped in the same synchronize object!

    0 讨论(0)
  • 2020-12-09 15:23

    It's not thread-safe, for one thing.

    0 讨论(0)
提交回复
热议问题