Skip to content

Commit b5ef0c7

Browse files
committed
Add comment for DateFormat changes
1 parent 767de83 commit b5ef0c7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/java/net/sf/jabref/net/Cookie.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,11 @@ class Cookie {
2828
private Date expires;
2929
private String path;
3030

31+
/**
32+
* DateFormats should not be reused among instances (or rather among threads), because they are not thread-safe.
33+
* If they are shared, their usage should be synchronized.
34+
*/
3135
private final DateFormat expiresFormat1 = new SimpleDateFormat("E, dd MMM yyyy k:m:s 'GMT'", Locale.US);
32-
3336
private final DateFormat expiresFormat2 = new SimpleDateFormat("E, dd-MMM-yyyy k:m:s 'GMT'", Locale.US);
3437

3538

0 commit comments

Comments
 (0)