forked from chanjarster/weixin-java-tools
-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.text.SimpleDateFormat 线程安全问题 #36
Comments
没太明白,你发这个是想指出哪部分代码已经有潜在的问题了么? |
这里有线程安全问题:
|
我仔细考虑下了,这个地方确实是可能有问题的,因为是静态共享的,所以才可能在多线程高并发环境下,使用其parse或format方法时有线程问题 |
感谢提出这个问题,我们将彻查代码,修复可能有问题的地方 |
已修复,代码提交到develop分支 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
java.text.SimpleDateFormat 内部是有状态的,并非线程安全。
SimpleDateFormat javadoc
org.apache.commons.lang3.time.FastDateFormat 才是线程安全的。
FastDateFormat javadoc
The text was updated successfully, but these errors were encountered: