Remove unnecessary test for availability of classes
We used to need this test when we supported Java 6 and 7,
but it's no longer needed with Java 8 as the minimum.
@@ -41,15 +41,10 @@ import java.util.Map;
public class Jsr310CodecProvider implements CodecProvider {
private static final Map<Class<?>, Codec<?>> JSR310_CODEC_MAP = new HashMap<Class<?>, Codec<?>>();
static {
- try {
- Class.forName("java.time.Instant"); // JSR-310 support canary test.
putCodec(new InstantCodec());
putCodec(new LocalDateCodec());
putCodec(new LocalDateTimeCodec());
putCodec(new LocalTimeCodec());
- } catch (ClassNotFoundException e) {
- // No JSR-310 support
- }
}
private static void putCodec(final Codec<?> codec) {
