FIX: Add fallback for Ebean 11 Jsons

This commit is contained in:
Roland Praml committed 2022-10-25 11:37:49 +02:00
1 parent 7152cf656b
commit e2d75f4c2e
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