Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
a1bb0e65
Commit
a1bb0e65
authored
7 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Removed unnecessary synchronization on toString().
parent
0ab14a67
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/gitlab4j/api/utils/ISO8601.java
+3
-3
src/main/java/org/gitlab4j/api/utils/ISO8601.java
with
3 additions
and
3 deletions
+3
-3
src/main/java/org/gitlab4j/api/utils/ISO8601.java
+
3
-
3
View file @
a1bb0e65
...
...
@@ -21,7 +21,7 @@ public class ISO8601 {
public
static
final
String
OUTPUT_MSEC_PATTERN
=
"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
;
public
static
final
String
UTC_PATTERN
=
"yyyy-MM-dd HH:mm:ss 'UTC'"
;
// Set up ThreadLocal storage to save a thread local SimpleDateFormat keyed with the format string
f
// Set up ThreadLocal storage to save a thread local SimpleDateFormat keyed with the format string
private
static
final
class
SafeDateFormatter
{
private
static
final
ThreadLocal
<
Map
<
String
,
SimpleDateFormat
>>
safeFormats
=
new
ThreadLocal
<
Map
<
String
,
SimpleDateFormat
>>()
{
...
...
@@ -89,7 +89,7 @@ public class ISO8601 {
* @param withMsec flag indicating whether to include milliseconds
* @return a ISO8601 formatted string for the provided Date instance, or null if date is null
*/
public
static
synchronized
String
toString
(
Date
date
,
boolean
withMsec
)
{
public
static
String
toString
(
Date
date
,
boolean
withMsec
)
{
if
(
date
==
null
)
{
return
(
null
);
...
...
@@ -107,7 +107,7 @@ public class ISO8601 {
* @param date the Date instance to get the ISO8601 formatted string for
* @return a ISO8601 formatted string for the provided Date instance, or null if date is null
*/
public
static
synchronized
String
toString
(
Date
date
)
{
public
static
String
toString
(
Date
date
)
{
return
(
toString
(
date
,
true
));
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets