From bda56763a85ccd628396abd4448e093b273bd101 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 19 Mar 2022 14:29:54 +0000 Subject: [PATCH] Replace peplaceAll with replace It does the same thing if the first argument is not a regex. --- .../bentobox/bentobox/database/yaml/YamlDatabaseHandler.java | 2 +- src/main/java/world/bentobox/bentobox/managers/WebManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/world/bentobox/bentobox/database/yaml/YamlDatabaseHandler.java b/src/main/java/world/bentobox/bentobox/database/yaml/YamlDatabaseHandler.java index 05b42d537..9db21cd98 100644 --- a/src/main/java/world/bentobox/bentobox/database/yaml/YamlDatabaseHandler.java +++ b/src/main/java/world/bentobox/bentobox/database/yaml/YamlDatabaseHandler.java @@ -452,7 +452,7 @@ public class YamlDatabaseHandler extends AbstractDatabaseHandler { for (Entry object : value.entrySet()) { // Serialize all key and values String key = (String)serialize(object.getKey()); - key = key.replaceAll("\\.", ":dot:"); + key = key.replace("\\.", ":dot:"); result.put(key, serialize(object.getValue())); } // Save the list in the config file diff --git a/src/main/java/world/bentobox/bentobox/managers/WebManager.java b/src/main/java/world/bentobox/bentobox/managers/WebManager.java index dbd5ef1d5..a1c103253 100644 --- a/src/main/java/world/bentobox/bentobox/managers/WebManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/WebManager.java @@ -196,7 +196,7 @@ public class WebManager { @NonNull private String getContent(@NonNull GitHubRepository repo, String fileName) { try { - String content = repo.getContent(fileName).getContent().replaceAll("\\n", ""); + String content = repo.getContent(fileName).getContent().replace("\\n", ""); return new String(Base64.getDecoder().decode(content), StandardCharsets.UTF_8); } catch (IllegalAccessException e) { // Fail silently