mirror of
https://github.com/PaperMC/Waterfall.git
synced 2024-07-08 20:34:46 +02:00
getMojangUUID was a replacement for the regex conversion of UUIDs to Mojang's format. I have removed this method and the associated unit tests because it is nothing more than a wrapper around String#replace. This new patch simply replaces the call to String#replaceAll with a call to String#replace. Patch 0011 was affected by this change, and has been fixed. Merges #9
33 lines
1.3 KiB
Diff
33 lines
1.3 KiB
Diff
From c5c7f68d947f366fef739e0ac3a655baed507bfe Mon Sep 17 00:00:00 2001
|
|
From: Jadon Fowler <jadonflower@gmail.com>
|
|
Date: Tue, 31 May 2016 00:36:01 -0600
|
|
Subject: [PATCH] Optimize conversion to Mojang-style UUIDs by avoiding regex
|
|
|
|
diff --git a/api/src/main/java/net/md_5/bungee/api/ServerPing.java b/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
|
index 314a1d2..6804ad9 100644
|
|
--- a/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
|
+++ b/api/src/main/java/net/md_5/bungee/api/ServerPing.java
|
|
@@ -73,7 +73,7 @@ public class ServerPing
|
|
|
|
public String getId()
|
|
{
|
|
- return uniqueId.toString().replaceAll( "-", "" );
|
|
+ return uniqueId.toString().replace( "-", "" );
|
|
}
|
|
}
|
|
|
|
diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
index dab6ef2..ad19168 100644
|
|
--- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
+++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java
|
|
@@ -603,7 +603,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|
@Override
|
|
public String getUUID()
|
|
{
|
|
- return uniqueId.toString().replaceAll( "-", "" );
|
|
+ return uniqueId.toString().replace( "-", "" );
|
|
}
|
|
|
|
@Override
|
|
--
|
|
2.8.3
|