summaryrefslogtreecommitdiff
path: root/java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template
diff options
context:
space:
mode:
Diffstat (limited to 'java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template')
-rw-r--r--java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template15
1 files changed, 15 insertions, 0 deletions
diff --git a/java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template b/java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template
new file mode 100644
index 000000000000..377017bd41c6
--- /dev/null
+++ b/java/typeMigration/src/intentionDescriptions/ConvertFieldToThreadLocalIntention/after.java.template
@@ -0,0 +1,15 @@
+import java.text.*;
+import java.util.Date;
+
+class X {
+ private static final ThreadLocal<DateFormat> dateFormat = new ThreadLocal<DateFormat>() {
+ @Override
+ protected DateFormat initialValue() {
+ return new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z");
+ }
+ };
+
+ public String getDateString() {
+ return dateFormat.get().format(new Date());
+ }
+} \ No newline at end of file