File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
bson/src/main/org/bson/codecs/jsr310 Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change 41
41
public class Jsr310CodecProvider implements CodecProvider {
42
42
private static final Map <Class <?>, Codec <?>> JSR310_CODEC_MAP = new HashMap <Class <?>, Codec <?>>();
43
43
static {
44
- try {
45
- Class .forName ("java.time.Instant" ); // JSR-310 support canary test.
46
- putCodec (new InstantCodec ());
47
- putCodec (new LocalDateCodec ());
48
- putCodec (new LocalDateTimeCodec ());
49
- putCodec (new LocalTimeCodec ());
50
- } catch (ClassNotFoundException e ) {
51
- // No JSR-310 support
52
- }
44
+ putCodec (new InstantCodec ());
45
+ putCodec (new LocalDateCodec ());
46
+ putCodec (new LocalDateTimeCodec ());
47
+ putCodec (new LocalTimeCodec ());
53
48
}
54
49
55
50
private static void putCodec (final Codec <?> codec ) {
You can’t perform that action at this time.
0 commit comments