mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
Remove @Synchronized annotation from Rfc3339DateJsonAdapter
. (#1842)
* Remove synchronized modifier from Rfc3339DateJsonAdapter * Added a small note to avoid regression in the future.
This commit is contained in:
@@ -34,7 +34,8 @@ import java.util.Date
|
||||
* ```
|
||||
*/
|
||||
public class Rfc3339DateJsonAdapter : JsonAdapter<Date>() {
|
||||
@Synchronized
|
||||
|
||||
/** The underlying deserialization logic is thread-safe and does not require synchronization. **/
|
||||
@Throws(IOException::class)
|
||||
override fun fromJson(reader: JsonReader): Date? {
|
||||
if (reader.peek() == NULL) {
|
||||
@@ -44,7 +45,7 @@ public class Rfc3339DateJsonAdapter : JsonAdapter<Date>() {
|
||||
return string.parseIsoDate()
|
||||
}
|
||||
|
||||
@Synchronized
|
||||
/*** The underlying serialization logic is thread-safe and does not require synchronization. **/
|
||||
@Throws(IOException::class)
|
||||
override fun toJson(writer: JsonWriter, value: Date?) {
|
||||
if (value == null) {
|
||||
|
Reference in New Issue
Block a user