Elffuss BraidHub

kikocis/java-driver public

Suppress "Usage of API documented as @since 1.7+" IntelliJ errors.

IntelliJ can report inadequate usage of API call, which is very useful in normal situations,
but enabling this warning would mark the whole jdk8 package with errors.

This commit disables the errors for classes in this package, but to achieve this,
no imports could be used, and offending classes must appear with fully-qualified class names everywhere.
Changesetb401801f3d44b4b60bb97ef427b5a74ef56e0527f48ad37d97a4990186c11129
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2016-03-24 17:09 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2016-04-20 18:02 +02:00
Parentsbd350391f78d

Browse the files at this changeset

6 files changed

modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java +23 −29
@@ -21,26 +21,19 @@
2121 import com.datastax.driver.core.exceptions.InvalidTypeException;
2222
2323 import java.nio.ByteBuffer;
24-import java.time.Instant;
25-import java.time.format.DateTimeFormatter;
26-import java.time.format.DateTimeFormatterBuilder;
27-import java.time.format.DateTimeParseException;
2824
2925 import static com.datastax.driver.core.ParseUtils.*;
3026 import static java.lang.Long.parseLong;
31-import static java.time.Instant.ofEpochMilli;
32-import static java.time.ZoneOffset.UTC;
33-import static java.time.temporal.ChronoField.*;
3427
3528 /**
36- * {@link TypeCodec} that maps {@link Instant} to CQL {@code timestamp}
29+ * {@link TypeCodec} that maps {@link java.time.Instant} to CQL {@code timestamp}
3730 * allowing the setting and retrieval of {@code timestamp}
38- * columns as {@link Instant} instances.
31+ * columns as {@link java.time.Instant} instances.
3932 * <p/>
4033 * Since C* <code>timestamp</code> columns do not preserve timezones
4134 * any attached timezone information will be lost.
4235 * <p/>
43- * <strong>IMPORTANT</strong>: this codec's {@link #format(Instant) format} method formats
36+ * <strong>IMPORTANT</strong>: this codec's {@link #format(java.time.Instant) format} method formats
4437 * timestamps using an ISO-8601 format that includes milliseconds.
4538 * <strong>This format is incompatible with Cassandra versions < 2.0.9.</strong>
4639 *
@@ -48,64 +41,65 @@
4841 * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">'Working with timestamps' section of CQL specification</a>
4942 */
5043 @IgnoreJDK6Requirement
44+@SuppressWarnings("Since15")
5145 public class InstantCodec extends TypeCodec<java.time.Instant> {
5246
5347 public static final InstantCodec instance = new InstantCodec();
5448
5549 /**
56- * A {@link DateTimeFormatter} that parses (most) of
50+ * A {@link java.time.format.DateTimeFormatter} that parses (most) of
5751 * the ISO formats accepted in CQL.
5852 */
59- private static final DateTimeFormatter PARSER = new DateTimeFormatterBuilder()
53+ private static final java.time.format.DateTimeFormatter PARSER = new java.time.format.DateTimeFormatterBuilder()
6054 .parseCaseSensitive()
6155 .parseStrict()
62- .append(DateTimeFormatter.ISO_LOCAL_DATE)
56+ .append(java.time.format.DateTimeFormatter.ISO_LOCAL_DATE)
6357 .optionalStart()
6458 .appendLiteral('T')
65- .appendValue(HOUR_OF_DAY, 2)
59+ .appendValue(java.time.temporal.ChronoField.HOUR_OF_DAY, 2)
6660 .appendLiteral(':')
67- .appendValue(MINUTE_OF_HOUR, 2)
61+ .appendValue(java.time.temporal.ChronoField.MINUTE_OF_HOUR, 2)
6862 .optionalEnd()
6963 .optionalStart()
7064 .appendLiteral(':')
71- .appendValue(SECOND_OF_MINUTE, 2)
65+ .appendValue(java.time.temporal.ChronoField.SECOND_OF_MINUTE, 2)
7266 .optionalEnd()
7367 .optionalStart()
74- .appendFraction(NANO_OF_SECOND, 0, 9, true)
68+ .appendFraction(java.time.temporal.ChronoField.NANO_OF_SECOND, 0, 9, true)
7569 .optionalEnd()
7670 .optionalStart()
7771 .appendZoneId()
7872 .optionalEnd()
7973 .toFormatter()
80- .withZone(UTC);
74+ .withZone(java.time.ZoneOffset.UTC);
8175
82- private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
83- .withZone(UTC);
76+ private static final java.time.format.DateTimeFormatter FORMATTER = java.time.format.DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSSxxx")
77+ .withZone(java.time.ZoneOffset.UTC);
8478
8579
8680 private InstantCodec() {
87- super(DataType.timestamp(), Instant.class);
81+ super(DataType.timestamp(), java.time.Instant.class);
8882 }
8983
9084 @Override
91- public ByteBuffer serialize(Instant value, ProtocolVersion protocolVersion) {
85+ public ByteBuffer serialize(java.time.Instant value, ProtocolVersion protocolVersion) {
9286 return value == null ? null : bigint().serializeNoBoxing(value.toEpochMilli(), protocolVersion);
9387 }
9488
9589 @Override
96- public Instant deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) {
97- return bytes == null || bytes.remaining() == 0 ? null : ofEpochMilli(bigint().deserializeNoBoxing(bytes, protocolVersion));
90+ public java.time.Instant deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) {
91+ return bytes == null || bytes.remaining() == 0 ? null : java.time.Instant.ofEpochMilli(bigint().deserializeNoBoxing(bytes, protocolVersion));
9892 }
9993
10094 @Override
101- public String format(Instant value) {
95+ public String format(java.time.Instant value) {
10296 if (value == null)
10397 return "NULL";
10498 return quote(FORMATTER.format(value));
10599 }
106100
107101 @Override
108- public Instant parse(String value) {
102+ public java.time.Instant parse(String value) {
109103 if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL"))
110104 return null;
111105 // strip enclosing single quotes, if any
@@ -113,14 +107,14 @@
113107 value = unquote(value);
114108 if (isLongLiteral(value)) {
115109 try {
116- return ofEpochMilli(parseLong(value));
110+ return java.time.Instant.ofEpochMilli(parseLong(value));
117111 } catch (NumberFormatException e) {
118112 throw new InvalidTypeException(String.format("Cannot parse timestamp value from \"%s\"", value));
119113 }
120114 }
121115 try {
122- return Instant.from(PARSER.parse(value));
123- } catch (DateTimeParseException e) {
116+ return java.time.Instant.from(PARSER.parse(value));
117+ } catch (java.time.format.DateTimeParseException e) {
124118 throw new InvalidTypeException(String.format("Cannot parse timestamp value from \"%s\"", value));
125119 }
126120 }
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java +11 −13
@@ -21,40 +21,38 @@
2121 import com.datastax.driver.core.exceptions.InvalidTypeException;
2222
2323 import java.nio.ByteBuffer;
24-import java.time.LocalDate;
25-import java.time.temporal.ChronoUnit;
2624
2725 import static com.datastax.driver.core.CodecUtils.*;
2826 import static com.datastax.driver.core.ParseUtils.*;
2927 import static java.lang.Long.parseLong;
30-import static java.time.format.DateTimeFormatter.ISO_LOCAL_DATE;
3128
3229 /**
3330 * {@link TypeCodec} that maps
3431 * {@link java.time.LocalDate} to CQL {@code date}.
3532 */
3633 @IgnoreJDK6Requirement
37-public class LocalDateCodec extends TypeCodec<LocalDate> {
34+@SuppressWarnings("Since15")
35+public class LocalDateCodec extends TypeCodec<java.time.LocalDate> {
3836
3937 public static final LocalDateCodec instance = new LocalDateCodec();
4038
41- private static final LocalDate EPOCH = LocalDate.of(1970, 1, 1);
39+ private static final java.time.LocalDate EPOCH = java.time.LocalDate.of(1970, 1, 1);
4240
4341 private LocalDateCodec() {
44- super(DataType.date(), LocalDate.class);
42+ super(DataType.date(), java.time.LocalDate.class);
4543 }
4644
4745 @Override
48- public ByteBuffer serialize(LocalDate value, ProtocolVersion protocolVersion) {
46+ public ByteBuffer serialize(java.time.LocalDate value, ProtocolVersion protocolVersion) {
4947 if (value == null)
5048 return null;
51- long days = ChronoUnit.DAYS.between(EPOCH, value);
49+ long days = java.time.temporal.ChronoUnit.DAYS.between(EPOCH, value);
5250 int unsigned = fromSignedToUnsignedInt((int) days);
5351 return cint().serializeNoBoxing(unsigned, protocolVersion);
5452 }
5553
5654 @Override
57- public LocalDate deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) {
55+ public java.time.LocalDate deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) {
5856 if (bytes == null || bytes.remaining() == 0)
5957 return null;
6058 int unsigned = cint().deserializeNoBoxing(bytes, protocolVersion);
@@ -63,14 +61,14 @@
6361 }
6462
6563 @Override
66- public String format(LocalDate value) {
64+ public String format(java.time.LocalDate value) {
6765 if (value == null)
6866 return "NULL";
69- return quote(ISO_LOCAL_DATE.format(value));
67+ return quote(java.time.format.DateTimeFormatter.ISO_LOCAL_DATE.format(value));
7068 }
7169
7270 @Override
73- public LocalDate parse(String value) {
71+ public java.time.LocalDate parse(String value) {
7472 if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL"))
7573 return null;
7674
@@ -96,7 +94,7 @@
9694 }
9795
9896 try {
99- return LocalDate.parse(value, ISO_LOCAL_DATE);
97+ return java.time.LocalDate.parse(value, java.time.format.DateTimeFormatter.ISO_LOCAL_DATE);
10098 } catch (RuntimeException e) {
10199 throw new InvalidTypeException(String.format("Cannot parse date value from \"%s\"", value));
102100 }
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java +12 −13
@@ -22,49 +22,48 @@
2222 import com.datastax.driver.core.exceptions.InvalidTypeException;
2323
2424 import java.nio.ByteBuffer;
25-import java.time.LocalTime;
26-import java.time.format.DateTimeFormatter;
2725
2826 import static com.datastax.driver.core.ParseUtils.quote;
2927
3028 /**
31- * {@link TypeCodec} that maps {@link LocalTime} to CQL {@code time} (long representing nanoseconds since midnight).
29+ * {@link TypeCodec} that maps {@link java.time.LocalTime} to CQL {@code time} (long representing nanoseconds since midnight).
3230 */
3331 @IgnoreJDK6Requirement
34-public class LocalTimeCodec extends TypeCodec<LocalTime> {
32+@SuppressWarnings("Since15")
33+public class LocalTimeCodec extends TypeCodec<java.time.LocalTime> {
3534
3635 public static final LocalTimeCodec instance = new LocalTimeCodec();
3736
38- private static final DateTimeFormatter FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss.SSS");
37+ private static final java.time.format.DateTimeFormatter FORMATTER = java.time.format.DateTimeFormatter.ofPattern("HH:mm:ss.SSS");
3938
4039 private LocalTimeCodec() {
41- super(DataType.time(), LocalTime.class);
40+ super(DataType.time(), java.time.LocalTime.class);
4241 }
4342
4443 @Override
45- public ByteBuffer serialize(LocalTime value, ProtocolVersion protocolVersion) throws InvalidTypeException {
44+ public ByteBuffer serialize(java.time.LocalTime value, ProtocolVersion protocolVersion) throws InvalidTypeException {
4645 if (value == null)
4746 return null;
4847 return bigint().serializeNoBoxing(value.toNanoOfDay(), protocolVersion);
4948 }
5049
5150 @Override
52- public LocalTime deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException {
51+ public java.time.LocalTime deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) throws InvalidTypeException {
5352 if (bytes == null || bytes.remaining() == 0)
5453 return null;
5554 long nanosOfDay = bigint().deserializeNoBoxing(bytes, protocolVersion);
56- return LocalTime.ofNanoOfDay(nanosOfDay);
55+ return java.time.LocalTime.ofNanoOfDay(nanosOfDay);
5756 }
5857
5958 @Override
60- public String format(LocalTime value) {
59+ public String format(java.time.LocalTime value) {
6160 if (value == null)
6261 return "NULL";
6362 return quote(FORMATTER.format(value));
6463 }
6564
6665 @Override
67- public LocalTime parse(String value) {
66+ public java.time.LocalTime parse(String value) {
6867 if (value == null || value.isEmpty() || value.equalsIgnoreCase("NULL"))
6968 return null;
7069
@@ -80,11 +79,11 @@
8079 } catch (NumberFormatException e) {
8180 throw new InvalidTypeException(String.format("Cannot parse time value from \"%s\"", value), e);
8281 }
83- return LocalTime.ofNanoOfDay(nanosOfDay);
82+ return java.time.LocalTime.ofNanoOfDay(nanosOfDay);
8483 }
8584
8685 try {
87- return LocalTime.parse(value);
86+ return java.time.LocalTime.parse(value);
8887 } catch (RuntimeException e) {
8988 throw new InvalidTypeException(String.format("Cannot parse time value from \"%s\"", value), e);
9089 }
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java +10 −11
@@ -22,21 +22,20 @@
2222
2323 import java.util.Collection;
2424 import java.util.Map;
25-import java.util.Optional;
26-import java.util.function.Predicate;
2725
2826 /**
29- * A codec that wraps other codecs around JDK 8's {@link Optional} API.
27+ * A codec that wraps other codecs around JDK 8's {@link java.util.Optional} API.
3028 *
3129 * @param <T> The wrapped Java type
3230 */
3331 @IgnoreJDK6Requirement
34-public class OptionalCodec<T> extends MappingCodec<Optional<T>, T> {
32+@SuppressWarnings({"Since15", "OptionalUsedAsFieldOrParameterType"})
33+public class OptionalCodec<T> extends MappingCodec<java.util.Optional<T>, T> {
3534
36- private final Predicate<T> isAbsent;
35+ private final java.util.function.Predicate<T> isAbsent;
3736
3837 public OptionalCodec(TypeCodec<T> codec) {
39- this(codec, new Predicate<T>() {
38+ this(codec, new java.util.function.Predicate<T>() {
4039 @Override
4140 public boolean test(T input) {
4241 return input == null
@@ -47,20 +46,20 @@
4746 });
4847 }
4948
50- public OptionalCodec(TypeCodec<T> codec, Predicate<T> isAbsent) {
49+ public OptionalCodec(TypeCodec<T> codec, java.util.function.Predicate<T> isAbsent) {
5150 // @formatter:off
52- super(codec, new TypeToken<Optional<T>>() {}.where(new TypeParameter<T>() {}, codec.getJavaType()));
51+ super(codec, new TypeToken<java.util.Optional<T>>() {}.where(new TypeParameter<T>() {}, codec.getJavaType()));
5352 // @formatter:on
5453 this.isAbsent = isAbsent;
5554 }
5655
5756 @Override
58- protected Optional<T> deserialize(T value) {
59- return isAbsent(value) ? Optional.<T>empty() : Optional.of(value);
57+ protected java.util.Optional<T> deserialize(T value) {
58+ return isAbsent(value) ? java.util.Optional.<T>empty() : java.util.Optional.of(value);
6059 }
6160
6261 @Override
63- protected T serialize(Optional<T> value) {
62+ protected T serialize(java.util.Optional<T> value) {
6463 return value.isPresent() ? value.get() : absentValue();
6564 }
6665
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java +24 −31
@@ -19,23 +19,15 @@
1919 import com.datastax.driver.core.exceptions.InvalidTypeException;
2020
2121 import java.nio.ByteBuffer;
22-import java.time.Instant;
23-import java.time.ZoneId;
24-import java.time.ZoneOffset;
25-import java.time.ZonedDateTime;
26-import java.time.format.DateTimeFormatter;
27-import java.time.format.DateTimeFormatterBuilder;
28-import java.time.format.DateTimeParseException;
2922 import java.util.List;
3023
3124 import static com.datastax.driver.core.ParseUtils.isLongLiteral;
3225 import static com.datastax.driver.core.ParseUtils.quote;
3326 import static com.google.common.base.Preconditions.checkArgument;
34-import static java.time.temporal.ChronoField.*;
3527
3628 /**
3729 * {@link TypeCodec} that maps
38- * {@link ZonedDateTime} to CQL {@code tuple<timestamp,varchar>},
30+ * {@link java.time.ZonedDateTime} to CQL {@code tuple<timestamp,varchar>},
3931 * providing a pattern for maintaining timezone information in
4032 * Cassandra.
4133 * <p/>
@@ -54,39 +46,40 @@
5446 * @see <a href="https://cassandra.apache.org/doc/cql3/CQL-2.2.html#usingtimestamps">'Working with timestamps' section of CQL specification</a>
5547 */
5648 @IgnoreJDK6Requirement
57-public class ZonedDateTimeCodec extends TypeCodec.AbstractTupleCodec<ZonedDateTime> {
49+@SuppressWarnings("Since15")
50+public class ZonedDateTimeCodec extends TypeCodec.AbstractTupleCodec<java.time.ZonedDateTime> {
5851
5952 /**
60- * A {@link DateTimeFormatter} that parses (most) of
53+ * A {@link java.time.format.DateTimeFormatter} that parses (most) of
6154 * the ISO formats accepted in CQL.
6255 */
63- private static final DateTimeFormatter FORMATTER = new DateTimeFormatterBuilder()
56+ private static final java.time.format.DateTimeFormatter FORMATTER = new java.time.format.DateTimeFormatterBuilder()
6457 .parseCaseSensitive()
6558 .parseStrict()
66- .append(DateTimeFormatter.ISO_LOCAL_DATE)
59+ .append(java.time.format.DateTimeFormatter.ISO_LOCAL_DATE)
6760 .optionalStart()
6861 .appendLiteral('T')
69- .appendValue(HOUR_OF_DAY, 2)
62+ .appendValue(java.time.temporal.ChronoField.HOUR_OF_DAY, 2)
7063 .appendLiteral(':')
71- .appendValue(MINUTE_OF_HOUR, 2)
64+ .appendValue(java.time.temporal.ChronoField.MINUTE_OF_HOUR, 2)
7265 .optionalEnd()
7366 .optionalStart()
7467 .appendLiteral(':')
75- .appendValue(SECOND_OF_MINUTE, 2)
68+ .appendValue(java.time.temporal.ChronoField.SECOND_OF_MINUTE, 2)
7669 .optionalEnd()
7770 .optionalStart()
78- .appendFraction(NANO_OF_SECOND, 0, 9, true)
71+ .appendFraction(java.time.temporal.ChronoField.NANO_OF_SECOND, 0, 9, true)
7972 .optionalEnd()
8073 .optionalStart()
8174 .appendZoneOrOffsetId()
8275 .optionalEnd()
8376 .toFormatter()
84- .withZone(ZoneOffset.UTC);
77+ .withZone(java.time.ZoneOffset.UTC);
8578
86- private static final DateTimeFormatter ZONE_FORMATTER = DateTimeFormatter.ofPattern("xxx");
79+ private static final java.time.format.DateTimeFormatter ZONE_FORMATTER = java.time.format.DateTimeFormatter.ofPattern("xxx");
8780
8881 public ZonedDateTimeCodec(TupleType tupleType) {
89- super(tupleType, ZonedDateTime.class);
82+ super(tupleType, java.time.ZonedDateTime.class);
9083 List<DataType> types = tupleType.getComponentTypes();
9184 checkArgument(
9285 types.size() == 2 && types.get(0).equals(DataType.timestamp()) && types.get(1).equals(DataType.varchar()),
@@ -95,12 +88,12 @@
9588 }
9689
9790 @Override
98- protected ZonedDateTime newInstance() {
91+ protected java.time.ZonedDateTime newInstance() {
9992 return null;
10093 }
10194
10295 @Override
103- protected ByteBuffer serializeField(ZonedDateTime source, int index, ProtocolVersion protocolVersion) {
96+ protected ByteBuffer serializeField(java.time.ZonedDateTime source, int index, ProtocolVersion protocolVersion) {
10497 if (index == 0) {
10598 long millis = source.toInstant().toEpochMilli();
10699 return bigint().serializeNoBoxing(millis, protocolVersion);
@@ -112,20 +105,20 @@
112105 }
113106
114107 @Override
115- protected ZonedDateTime deserializeAndSetField(ByteBuffer input, ZonedDateTime target, int index, ProtocolVersion protocolVersion) {
108+ protected java.time.ZonedDateTime deserializeAndSetField(ByteBuffer input, java.time.ZonedDateTime target, int index, ProtocolVersion protocolVersion) {
116109 if (index == 0) {
117110 long millis = bigint().deserializeNoBoxing(input, protocolVersion);
118- return Instant.ofEpochMilli(millis).atZone(ZoneOffset.UTC);
111+ return java.time.Instant.ofEpochMilli(millis).atZone(java.time.ZoneOffset.UTC);
119112 }
120113 if (index == 1) {
121114 String zoneId = varchar().deserialize(input, protocolVersion);
122- return target.withZoneSameInstant(ZoneId.of(zoneId));
115+ return target.withZoneSameInstant(java.time.ZoneId.of(zoneId));
123116 }
124117 throw new IndexOutOfBoundsException("Tuple index out of bounds. " + index);
125118 }
126119
127120 @Override
128- protected String formatField(ZonedDateTime value, int index) {
121+ protected String formatField(java.time.ZonedDateTime value, int index) {
129122 if (index == 0) {
130123 return quote(FORMATTER.format(value));
131124 }
@@ -136,7 +129,7 @@
136129 }
137130
138131 @Override
139- protected ZonedDateTime parseAndSetField(String input, ZonedDateTime target, int index) {
132+ protected java.time.ZonedDateTime parseAndSetField(String input, java.time.ZonedDateTime target, int index) {
140133 if (index == 0) {
141134 // strip enclosing single quotes, if any
142135 if (ParseUtils.isQuoted(input))
@@ -144,20 +137,20 @@
144137 if (isLongLiteral(input)) {
145138 try {
146139 long millis = Long.parseLong(input);
147- return ZonedDateTime.ofInstant(Instant.ofEpochMilli(millis), ZoneOffset.UTC);
140+ return java.time.ZonedDateTime.ofInstant(java.time.Instant.ofEpochMilli(millis), java.time.ZoneOffset.UTC);
148141 } catch (NumberFormatException e) {
149142 throw new InvalidTypeException(String.format("Cannot parse timestamp value from \"%s\"", input));
150143 }
151144 }
152145 try {
153- return ZonedDateTime.from(FORMATTER.parse(input));
154- } catch (DateTimeParseException e) {
146+ return java.time.ZonedDateTime.from(FORMATTER.parse(input));
147+ } catch (java.time.format.DateTimeParseException e) {
155148 throw new InvalidTypeException(String.format("Cannot parse timestamp value from \"%s\"", target));
156149 }
157150 }
158151 if (index == 1) {
159152 String zoneId = varchar().parse(input);
160- return target.withZoneSameInstant(ZoneId.of(zoneId));
153+ return target.withZoneSameInstant(java.time.ZoneId.of(zoneId));
161154 }
162155 throw new IndexOutOfBoundsException("Tuple index out of bounds. " + index);
163156 }
modified driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java +1 −1
@@ -18,7 +18,7 @@
1818 * This package contains a collection of convenience
1919 * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for
2020 * serializing between CQL types and Java 8 types, such as the ones from the
21- * {@link java.time} API and {@link java.util.Optional}.
21+ * {@code java.time} API and {@code java.util.Optional}.
2222 * <p/>
2323 * <p/>
2424 * Note that, while the driver remains globally compatible with older JDKs,