Skip to content

Commit a1bb0e6

Browse files
committed
Removed unnecessary synchronization on toString().
1 parent 0ab14a6 commit a1bb0e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/org/gitlab4j/api/utils/ISO8601.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public class ISO8601 {
2121
public static final String OUTPUT_MSEC_PATTERN = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";
2222
public static final String UTC_PATTERN = "yyyy-MM-dd HH:mm:ss 'UTC'";
2323

24-
// Set up ThreadLocal storage to save a thread local SimpleDateFormat keyed with the format stringf
24+
// Set up ThreadLocal storage to save a thread local SimpleDateFormat keyed with the format string
2525
private static final class SafeDateFormatter {
2626

2727
private static final ThreadLocal<Map<String, SimpleDateFormat>> safeFormats = new ThreadLocal<Map<String, SimpleDateFormat>>() {
@@ -89,7 +89,7 @@ public static String toString(Calendar cal) {
8989
* @param withMsec flag indicating whether to include milliseconds
9090
* @return a ISO8601 formatted string for the provided Date instance, or null if date is null
9191
*/
92-
public static synchronized String toString(Date date, boolean withMsec) {
92+
public static String toString(Date date, boolean withMsec) {
9393

9494
if (date == null) {
9595
return (null);
@@ -107,7 +107,7 @@ public static synchronized String toString(Date date, boolean withMsec) {
107107
* @param date the Date instance to get the ISO8601 formatted string for
108108
* @return a ISO8601 formatted string for the provided Date instance, or null if date is null
109109
*/
110-
public static synchronized String toString(Date date) {
110+
public static String toString(Date date) {
111111
return (toString(date, true));
112112
}
113113

0 commit comments

Comments
 (0)