|
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.EnumConverter;
|
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;
|
|
112 | 114 | * <li>java.sql.Date (no default value)</li>
|
113 | 115 | * <li>java.sql.Time (no default value)</li>
|
114 | 116 | * <li>java.sql.Timestamp (no default value)</li>
|
| 117 | + * <li>java.time.Instant (no default value)</li> |
115 | 118 | * <li>java.time.LocalDate (no default value)</li>
|
116 | 119 | * <li>java.time.LocalDateTime (no default value)</li>
|
117 | 120 | * <li>java.time.LocalTime (no default value)</li>
|
@@ -545,6 +548,7 @@ private void registerArrays(final boolean throwException, final int defaultArray
|
545 | 548 | registerArrayConverter(java.util.Date.class, new DateConverter(), throwException, defaultArraySize);
|
546 | 549 | registerArrayConverter(Calendar.class, new CalendarConverter(), throwException, defaultArraySize);
|
547 | 550 | registerArrayConverter(File.class, new FileConverter(), throwException, defaultArraySize);
|
| 551 | + registerArrayConverter(Instant.class, new InstantConverter(), throwException, defaultArraySize); |
548 | 552 | registerArrayConverter(Path.class, new PathConverter(), throwException, defaultArraySize);
|
549 | 553 | registerArrayConverter(java.sql.Date.class, new SqlDateConverter(), throwException, defaultArraySize);
|
550 | 554 | registerArrayConverter(java.sql.Time.class, new SqlTimeConverter(), throwException, defaultArraySize);
|
@@ -578,6 +582,7 @@ private void registerArrays(final boolean throwException, final int defaultArray
|
578 | 582 | * <li>{@link java.util.Date.class} - {@link DateConverter}</li>
|
579 | 583 | * <li>{@link java.util.Calendar.class} - {@link CalendarConverter}</li>
|
580 | 584 | * <li>{@code File.class} - {@link FileConverter}</li>
|
| 585 | + * <li>{@code Instant.class} - {@link InstantConverter}</li> |
581 | 586 | * <li>{@code Path.class} - {@link PathConverter}</li>
|
582 | 587 | * <li>{@link java.sql.Date.class} - {@link SqlDateConverter}</li>
|
583 | 588 | * <li>{@link java.sql.Time.class} - {@link SqlTimeConverter}</li>
|
@@ -610,6 +615,7 @@ private void registerOther(final boolean throwException) {
|
610 | 615 | register(java.util.Date.class, throwException ? new DateConverter() : new DateConverter(null));
|
611 | 616 | register(Calendar.class, throwException ? new CalendarConverter() : new CalendarConverter(null));
|
612 | 617 | register(File.class, throwException ? new FileConverter() : new FileConverter(null));
|
| 618 | + register(Instant.class, throwException ? new InstantConverter() : new InstantConverter(null)); |
613 | 619 | register(Path.class, throwException ? new PathConverter() : new PathConverter(null));
|
614 | 620 | register(java.sql.Date.class, throwException ? new SqlDateConverter() : new SqlDateConverter(null));
|
615 | 621 | register(java.sql.Time.class, throwException ? new SqlTimeConverter() : new SqlTimeConverter(null));
|
|
0 commit comments