Skip to content

Commit f11e860

Browse files
committed
Removed a redundant class.
Still compatible with Java 6.
1 parent f385dd8 commit f11e860

File tree

2 files changed

+22
-54
lines changed

2 files changed

+22
-54
lines changed

src/main/java/org/apache/ibatis/type/Java8TypeHandlersRegistrar.java

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/main/java/org/apache/ibatis/type/TypeHandlerRegistry.java

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,17 @@
2222
import java.lang.reflect.Type;
2323
import java.math.BigDecimal;
2424
import java.math.BigInteger;
25+
import java.time.Instant;
26+
import java.time.LocalDate;
27+
import java.time.LocalDateTime;
28+
import java.time.LocalTime;
29+
import java.time.Month;
30+
import java.time.OffsetDateTime;
31+
import java.time.OffsetTime;
32+
import java.time.Year;
33+
import java.time.YearMonth;
34+
import java.time.ZonedDateTime;
35+
import java.time.chrono.JapaneseDate;
2536
import java.util.Collection;
2637
import java.util.Collections;
2738
import java.util.Date;
@@ -136,7 +147,17 @@ public TypeHandlerRegistry() {
136147

137148
// mybatis-typehandlers-jsr310
138149
if (Jdk.dateAndTimeApiExists) {
139-
Java8TypeHandlersRegistrar.registerDateAndTimeHandlers(this);
150+
this.register(Instant.class, InstantTypeHandler.class);
151+
this.register(LocalDateTime.class, LocalDateTimeTypeHandler.class);
152+
this.register(LocalDate.class, LocalDateTypeHandler.class);
153+
this.register(LocalTime.class, LocalTimeTypeHandler.class);
154+
this.register(OffsetDateTime.class, OffsetDateTimeTypeHandler.class);
155+
this.register(OffsetTime.class, OffsetTimeTypeHandler.class);
156+
this.register(ZonedDateTime.class, ZonedDateTimeTypeHandler.class);
157+
this.register(Month.class, MonthTypeHandler.class);
158+
this.register(Year.class, YearTypeHandler.class);
159+
this.register(YearMonth.class, YearMonthTypeHandler.class);
160+
this.register(JapaneseDate.class, JapaneseDateTypeHandler.class);
140161
}
141162

142163
// issue #273

0 commit comments

Comments
 (0)