Improving incorrect namespace/name error (#839)
* Improving incorrect namespace/name error * Update MinecraftChannelIdentifier.java
This commit is contained in:
@@ -52,9 +52,10 @@ public final class MinecraftChannelIdentifier implements ChannelIdentifier {
|
|||||||
Preconditions.checkArgument(!Strings.isNullOrEmpty(namespace), "namespace is null or empty");
|
Preconditions.checkArgument(!Strings.isNullOrEmpty(namespace), "namespace is null or empty");
|
||||||
Preconditions.checkArgument(name != null, "namespace is null or empty");
|
Preconditions.checkArgument(name != null, "namespace is null or empty");
|
||||||
Preconditions.checkArgument(VALID_IDENTIFIER_REGEX.matcher(namespace).matches(),
|
Preconditions.checkArgument(VALID_IDENTIFIER_REGEX.matcher(namespace).matches(),
|
||||||
"namespace is not valid");
|
"namespace is not valid, must match: %s got %s", VALID_IDENTIFIER_REGEX.toString(), namespace);
|
||||||
Preconditions
|
Preconditions
|
||||||
.checkArgument(VALID_IDENTIFIER_REGEX.matcher(name).matches(), "name is not valid");
|
.checkArgument(VALID_IDENTIFIER_REGEX.matcher(name).matches(),
|
||||||
|
"name is not valid, must match: %s got %s", VALID_IDENTIFIER_REGEX.toString(), name);
|
||||||
return new MinecraftChannelIdentifier(namespace, name);
|
return new MinecraftChannelIdentifier(namespace, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user