Elffuss BraidHub

kikocis/java-driver public

Check for null inputs.
Changeset291b71942c6660e7b6e1673cdb7720061c9b1bf0cef84e6daff0ca042e293977
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2016-03-01 10:12 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2016-03-03 11:49 +01:00
Parents5094ad5a468e

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Metadata.java +2 −2
@@ -470,12 +470,12 @@
470470 * convenience utility and should not be considered as an authoritative
471471 * source of truth for checking reserved CQL keywords.
472472 *
473- * @param id the identifier to check.
473+ * @param id the identifier to check; should not be {@code null}.
474474 * @return {@code true} if the given identifier is a known reserved
475475 * CQL keyword, {@code false} otherwise.
476476 */
477477 public static boolean isReservedCqlKeyword(String id) {
478- return RESERVED_KEYWORDS.contains(id.toLowerCase());
478+ return id != null && RESERVED_KEYWORDS.contains(id.toLowerCase());
479479 }
480480
481481 /**