3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-16 21:10:30 +01:00

Improving incorrect namespace/name error (#839)

* Improving incorrect namespace/name error

* Update MinecraftChannelIdentifier.java
Dieser Commit ist enthalten in:
IkeVoodoo 2022-08-17 06:54:16 +02:00 committet von GitHub
Ursprung fbde1ff82a
Commit 048fd90359
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -52,9 +52,10 @@ public final class MinecraftChannelIdentifier implements ChannelIdentifier {
Preconditions.checkArgument(!Strings.isNullOrEmpty(namespace), "namespace is null or empty");
Preconditions.checkArgument(name != null, "namespace is null or empty");
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
.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);
}