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

前端 未结 8 1799
失恋的感觉
失恋的感觉 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!

提交回复
热议问题