|
30 | 30 | import java.nio.file.Path;
|
31 | 31 | import java.sql.Timestamp;
|
32 | 32 | import java.time.Duration;
|
| 33 | +import java.time.Instant; |
33 | 34 | import java.time.LocalDate;
|
34 | 35 | import java.time.LocalDateTime;
|
35 | 36 | import java.time.LocalTime;
|
|
68 | 69 | import org.apache.commons.beanutils2.converters.FileConverter;
|
69 | 70 | import org.apache.commons.beanutils2.converters.FloatConverter;
|
70 | 71 | import org.apache.commons.beanutils2.converters.InetAddressConverter;
|
| 72 | +import org.apache.commons.beanutils2.converters.InstantConverter; |
71 | 73 | import org.apache.commons.beanutils2.converters.IntegerConverter;
|
72 | 74 | import org.apache.commons.beanutils2.converters.LocalDateConverter;
|
73 | 75 | import org.apache.commons.beanutils2.converters.LocalDateTimeConverter;
|
|
144 | 146 | * <li>java.sql.Date (no default value)</li>
|
145 | 147 | * <li>java.sql.Time (no default value)</li>
|
146 | 148 | * <li>java.sql.Timestamp (no default value)</li>
|
| 149 | + * <li>java.time.Instant (no default value)</li> |
147 | 150 | * <li>java.time.LocalDate (no default value)</li>
|
148 | 151 | * <li>java.time.LocalDateTime (no default value)</li>
|
149 | 152 | * <li>java.time.LocalTime (no default value)</li>
|
@@ -500,6 +503,7 @@ private void registerArrays(final boolean throwException, final int defaultArray
|
500 | 503 | registerArrayConverter(Dimension.class, new DimensionConverter(), throwException, defaultArraySize);
|
501 | 504 | registerArrayConverter(File.class, new FileConverter(), throwException, defaultArraySize);
|
502 | 505 | registerArrayConverter(InetAddress.class, new InetAddressConverter(), throwException, defaultArraySize);
|
| 506 | + registerArrayConverter(Instant.class, new InstantConverter(), throwException, defaultArraySize); |
503 | 507 | registerArrayConverter(Path.class, new PathConverter(), throwException, defaultArraySize);
|
504 | 508 | registerArrayConverter(java.sql.Date.class, new SqlDateConverter(), throwException, defaultArraySize);
|
505 | 509 | registerArrayConverter(java.sql.Time.class, new SqlTimeConverter(), throwException, defaultArraySize);
|
@@ -536,6 +540,7 @@ private void registerArrays(final boolean throwException, final int defaultArray
|
536 | 540 | * <li>{@code java.util.Date.class} - {@link DateConverter}</li>
|
537 | 541 | * <li>{@code java.util.Calendar.class} - {@link CalendarConverter}</li>
|
538 | 542 | * <li>{@code File.class} - {@link FileConverter}</li>
|
| 543 | + * <li>{@code Instant.class} - {@link InstantConverter}</li> |
539 | 544 | * <li>{@code Path.class} - {@link PathConverter}</li>
|
540 | 545 | * <li>{@code java.sql.Date.class} - {@link SqlDateConverter}</li>
|
541 | 546 | * <li>{@code java.sql.Time.class} - {@link SqlTimeConverter}</li>
|
@@ -571,6 +576,7 @@ private void registerOther(final boolean throwException) {
|
571 | 576 | register(Calendar.class, throwException ? new CalendarConverter() : new CalendarConverter(null));
|
572 | 577 | register(File.class, throwException ? new FileConverter() : new FileConverter(null));
|
573 | 578 | register(InetAddress.class, throwException ? new InetAddressConverter() : new InetAddressConverter(null));
|
| 579 | + register(Instant.class, throwException ? new InstantConverter() : new InstantConverter(null)); |
574 | 580 | register(Path.class, throwException ? new PathConverter() : new PathConverter(null));
|
575 | 581 | register(java.sql.Date.class, throwException ? new SqlDateConverter() : new SqlDateConverter(null));
|
576 | 582 | register(java.sql.Time.class, throwException ? new SqlTimeConverter() : new SqlTimeConverter(null));
|
|
0 commit comments