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

Fix Checkstyle errors

Dieser Commit ist enthalten in:
Andrew Steinborn 2018-12-30 03:58:50 -05:00
Ursprung 5bf936d1b9
Commit 977d29ffa0
2 geänderte Dateien mit 4 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -1,5 +1,6 @@
package com.velocitypowered.proxy.connection.client; package com.velocitypowered.proxy.connection.client;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.velocitypowered.api.event.connection.ConnectionHandshakeEvent; import com.velocitypowered.api.event.connection.ConnectionHandshakeEvent;
@ -144,6 +145,7 @@ public class HandshakeSessionHandler implements MinecraftSessionHandler {
* @param hostname the host name to clean * @param hostname the host name to clean
* @return the cleaned hostname * @return the cleaned hostname
*/ */
@VisibleForTesting
static String cleanVhost(String hostname) { static String cleanVhost(String hostname) {
// Clean out any anything after any zero bytes (this includes BungeeCord forwarding and the // Clean out any anything after any zero bytes (this includes BungeeCord forwarding and the
// legacy Forge handshake indicator). // legacy Forge handshake indicator).

Datei anzeigen

@ -1,10 +1,9 @@
package com.velocitypowered.proxy.connection.client; package com.velocitypowered.proxy.connection.client;
import static com.velocitypowered.proxy.connection.client.HandshakeSessionHandler.cleanVhost; import static com.velocitypowered.proxy.connection.client.HandshakeSessionHandler.cleanVhost;
import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.*; import static com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants.HANDSHAKE_HOSTNAME_TOKEN;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.assertEquals;
import com.velocitypowered.proxy.connection.forge.legacy.LegacyForgeConstants;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
class HandshakeSessionHandlerTest { class HandshakeSessionHandlerTest {