From 98860214282441786d759ae200db4d40d4af6de0 Mon Sep 17 00:00:00 2001 From: NayXegp Date: Tue, 4 Sep 2018 22:36:02 +0200 Subject: [PATCH] #2521: Using replace instead of replaceAll --- api/src/main/java/net/md_5/bungee/api/ServerPing.java | 2 +- proxy/src/main/java/net/md_5/bungee/UserConnection.java | 2 +- .../main/java/net/md_5/bungee/connection/InitialHandler.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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 27b51849ba..2f707ba698 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 @@ -75,7 +75,7 @@ public void setId(String id) public String getId() { - return uniqueId.toString().replaceAll( "-", "" ); + return uniqueId.toString().replace( "-", "" ); } } diff --git a/proxy/src/main/java/net/md_5/bungee/UserConnection.java b/proxy/src/main/java/net/md_5/bungee/UserConnection.java index 14dc52f5e2..637428050d 100644 --- a/proxy/src/main/java/net/md_5/bungee/UserConnection.java +++ b/proxy/src/main/java/net/md_5/bungee/UserConnection.java @@ -581,7 +581,7 @@ public void setSettings(ClientSettings settings) @Override public Locale getLocale() { - return ( locale == null && settings != null ) ? locale = Locale.forLanguageTag( settings.getLocale().replaceAll( "_", "-" ) ) : locale; + return ( locale == null && settings != null ) ? locale = Locale.forLanguageTag( settings.getLocale().replace( '_', '-' ) ) : locale; } @Override 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 a6bd37200b..d4fadcf657 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 @@ -625,7 +625,7 @@ public void setUniqueId(UUID uuid) @Override public String getUUID() { - return uniqueId.toString().replaceAll( "-", "" ); + return uniqueId.toString().replace( "-", "" ); } @Override