HSQLDBRepository.toOffsetDateTime now returns null if passed null

This commit is contained in:
catbref 2019-05-28 17:27:29 +01:00
parent 58afb53be9
commit 23bcba1650

View File

@ -508,7 +508,10 @@ public class HSQLDBRepository implements Repository {
}
/** Converts milliseconds from epoch to OffsetDateTime needed for TIMESTAMP WITH TIME ZONE columns. */
/* package */ static OffsetDateTime toOffsetDateTime(long timestamp) {
/* package */ static OffsetDateTime toOffsetDateTime(Long timestamp) {
if (timestamp == null)
return null;
return OffsetDateTime.ofInstant(Instant.ofEpochMilli(timestamp), ZoneOffset.UTC);
}