Confusion about thread safety - SimpleDateFormat example

后端 未结 7 1148
野的像风
野的像风 2021-01-02 03:57

I have a question about thread safety. From what I have been told, SimpleDateFormat is not thread safe. I was wondering what effects it would have if I use it the followin

7条回答
  •  滥情空心
    2021-01-02 04:33

    Another way is, if you can ensure each time when your controller is called, you return a new instance, then remove the static reference.

提交回复
热议问题