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:
Ursprung
5bf936d1b9
Commit
977d29ffa0
@ -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).
|
||||||
|
@ -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 {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren