Skip to content

Commit

Permalink
api
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-cherednik committed Jan 2, 2024
1 parent aa13c6a commit e53ef2c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.KeyDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.key.Jsr310NullKeySerializer;
import lombok.RequiredArgsConstructor;

import java.io.IOException;
Expand Down Expand Up @@ -76,9 +75,8 @@ public static JacksonJsr310KeyDeserializer<ZonedDateTime> zonedDateTime(DateTime
}

@Override
@SuppressWarnings("deprecation")
public final Object deserializeKey(String key, DeserializationContext ctxt) throws IOException {
return Jsr310NullKeySerializer.NULL_KEY.equals(key) ? null : df.parse(key, query);
return "".equals(key) ? null : df.parse(key, query);
}
}

2 changes: 1 addition & 1 deletion src/test/java/ru/olegcherednik/json/jackson/ListUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @author Oleg Cherednik
* @since 22.12.2020
*/
@SuppressWarnings("PMD.ShortMethodName")
@SuppressWarnings({ "unchecked", "PMD.ShortMethodName" })
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ListUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import sun.util.calendar.ZoneInfo;

import java.util.TimeZone;

Expand All @@ -32,7 +31,7 @@
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class LocalTimeZone {

public static final TimeZone ASIA_SINGAPORE = ZoneInfo.getTimeZone(LocalZoneId.ASIA_SINGAPORE);
public static final TimeZone AUSTRALIA_SYDNEY = ZoneInfo.getTimeZone(LocalZoneId.AUSTRALIA_SYDNEY);
public static final TimeZone ASIA_SINGAPORE = TimeZone.getTimeZone(LocalZoneId.ASIA_SINGAPORE);
public static final TimeZone AUSTRALIA_SYDNEY = TimeZone.getTimeZone(LocalZoneId.AUSTRALIA_SYDNEY);

}

0 comments on commit e53ef2c

Please sign in to comment.