mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
fix thread-unsafe about SimpleDateFormat
This commit is contained in:
@@ -44,7 +44,7 @@ public class AcmEndpoint {
|
||||
|
||||
private final AcmPropertySourceRepository propertySourceRepository;
|
||||
|
||||
private ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>(){
|
||||
private ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>() {
|
||||
@Override
|
||||
protected DateFormat initialValue() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
@@ -30,7 +30,7 @@ public class AcmRefreshHistory {
|
||||
|
||||
private LinkedList<Record> records = new LinkedList<>();
|
||||
|
||||
private ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>(){
|
||||
private ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>() {
|
||||
@Override
|
||||
protected DateFormat initialValue() {
|
||||
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
Reference in New Issue
Block a user