mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-22 15:10:02 +00:00
Merge pull request #2869 from FOCONIS/fix-fallback-ebean11
FIX: Add fallback for Ebean 11 Jsons
This commit is contained in:
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
|
||||
|
||||
Reference in new issue
Block a user