Fix missing this causing unnormalized key to be validated

This commit is contained in:
md_5 2018-07-12 11:18:19 +10:00
parent 9cb65d72a3
commit bdd0eda71f

View file

@ -68,8 +68,8 @@ public final class NamespacedKey {
this.key = key.toLowerCase().toLowerCase(Locale.ROOT);
// Check validity after normalization
Preconditions.checkArgument(VALID_NAMESPACE.matcher(namespace).matches(), "namespace");
Preconditions.checkArgument(VALID_KEY.matcher(key).matches(), "key");
Preconditions.checkArgument(VALID_NAMESPACE.matcher(this.namespace).matches(), "namespace");
Preconditions.checkArgument(VALID_KEY.matcher(this.key).matches(), "key");
String string = toString();
Preconditions.checkArgument(string.length() < 256, "NamespacedKey must be less than 256 characters (%s)", string);