|
26 | 26 | import java.nio.file.Path;
|
27 | 27 | import java.sql.Timestamp;
|
28 | 28 | import java.time.Duration;
|
| 29 | +import java.time.Instant; |
29 | 30 | import java.time.LocalDate;
|
30 | 31 | import java.time.LocalDateTime;
|
31 | 32 | import java.time.LocalTime;
|
|
57 | 58 | import org.apache.commons.beanutils2.converters.DurationConverter;
|
58 | 59 | import org.apache.commons.beanutils2.converters.FileConverter;
|
59 | 60 | import org.apache.commons.beanutils2.converters.FloatConverter;
|
| 61 | +import org.apache.commons.beanutils2.converters.InstantConverter; |
60 | 62 | import org.apache.commons.beanutils2.converters.IntegerConverter;
|
61 | 63 | import org.apache.commons.beanutils2.converters.LocalDateConverter;
|
62 | 64 | import org.apache.commons.beanutils2.converters.LocalDateTimeConverter;
|
@@ -488,6 +490,7 @@ private void registerStandard(final boolean throwException, final boolean defaul
|
488 | 490 | * <li>{@code java.util.Date.class} - {@link DateConverter}</li>
|
489 | 491 | * <li>{@code java.util.Calendar.class} - {@link CalendarConverter}</li>
|
490 | 492 | * <li>{@code File.class} - {@link FileConverter}</li>
|
| 493 | + * <li>{@code Instant.class} - {@link InstantConverter}</li> |
491 | 494 | * <li>{@code Path.class} - {@link PathConverter}</li>
|
492 | 495 | * <li>{@code java.sql.Date.class} - {@link SqlDateConverter}</li>
|
493 | 496 | * <li>{@code java.sql.Time.class} - {@link SqlTimeConverter}</li>
|
@@ -520,6 +523,7 @@ private void registerOther(final boolean throwException) {
|
520 | 523 | register(java.util.Date.class, throwException ? new DateConverter() : new DateConverter(null));
|
521 | 524 | register(Calendar.class, throwException ? new CalendarConverter() : new CalendarConverter(null));
|
522 | 525 | register(File.class, throwException ? new FileConverter() : new FileConverter(null));
|
| 526 | + register(Instant.class, throwException ? new InstantConverter() : new InstantConverter(null)); |
523 | 527 | register(Path.class, throwException ? new PathConverter() : new PathConverter(null));
|
524 | 528 | register(java.sql.Date.class, throwException ? new SqlDateConverter() : new SqlDateConverter(null));
|
525 | 529 | register(java.sql.Time.class, throwException ? new SqlTimeConverter() : new SqlTimeConverter(null));
|
@@ -586,6 +590,7 @@ private void registerArrays(final boolean throwException, final int defaultArray
|
586 | 590 | registerArrayConverter(java.util.Date.class, new DateConverter(), throwException, defaultArraySize);
|
587 | 591 | registerArrayConverter(Calendar.class, new DateConverter(), throwException, defaultArraySize);
|
588 | 592 | registerArrayConverter(File.class, new FileConverter(), throwException, defaultArraySize);
|
| 593 | + registerArrayConverter(Instant.class, new InstantConverter(), throwException, defaultArraySize); |
589 | 594 | registerArrayConverter(Path.class, new PathConverter(), throwException, defaultArraySize);
|
590 | 595 | registerArrayConverter(java.sql.Date.class, new SqlDateConverter(), throwException, defaultArraySize);
|
591 | 596 | registerArrayConverter(java.sql.Time.class, new SqlTimeConverter(), throwException, defaultArraySize);
|
|
0 commit comments