Elffuss BraidHub

kikocis/java-driver public

Improve TypeCodec documentation.

This commit advises users against throwing exceptions from inside
parse() and format() methods.
Changeset7a0a782b9e9fe46b8a4e7fd1678eff0b4f92d0528d65ce94289e19a227b87276
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2016-09-07 12:05 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2016-09-16 10:45 -07:00
Parents64d8e0bf36e4

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +2 −2
@@ -533,8 +533,8 @@
533533 * {@link TupleValue}, and the internal representation of a {@code ROWS} response),
534534 * which may appear in driver logs.</li>
535535 * </ol>
536- * If choose not to implement this method, you can return a constant string (for example
537- * "XxxCodec.format not implemented").
536+ * If you choose not to implement this method, you should not throw an exception but
537+ * instead return a constant string (for example "XxxCodec.format not implemented").
538538 *
539539 * @param value An instance of T; may be {@code null}.
540540 * @return CQL string