Merge pull request #2869 from FOCONIS/fix-fallback-ebean11

FIX: Add fallback for Ebean 11 Jsons
This commit is contained in:
Rob Bygrave authored and GitHub committed 2022-10-26 17:26:08 +13:00
commit 8fd24491da
2 files changed
+44 -3

No files matched your search

@@ -11,6 +11,7 @@ import java.sql.Timestamp;
import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeParseException;
/**
* ScalarType for java.sql.Timestamp.
@@ -48,7 +49,7 @@ final class ScalarTypeLocalDateTime extends ScalarTypeBaseDateTime<LocalDateTime
@Override
public LocalDateTime jsonRead(JsonParser parser) throws IOException {
return LocalDateTime.parse(parser.getText());
return parse(parser.getText());
}
@Override
@@ -63,7 +64,11 @@ final class ScalarTypeLocalDateTime extends ScalarTypeBaseDateTime<LocalDateTime
@Override
public LocalDateTime parse(String value) {
return LocalDateTime.parse(value);
try {
return LocalDateTime.parse(value);
} catch (DateTimeParseException pe) {
return super.parse(value);
}
}
@Override