From a42d27f0567e89778419f432f8a299dab00a1942 Mon Sep 17 00:00:00 2001 From: Luck Date: Mon, 26 Feb 2018 17:27:28 +0000 Subject: [PATCH] Don't intern strings in ContextSets (#797) --- .../me/lucko/luckperms/api/context/AbstractContextSet.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/api/src/main/java/me/lucko/luckperms/api/context/AbstractContextSet.java b/api/src/main/java/me/lucko/luckperms/api/context/AbstractContextSet.java index 03074a35..723a9511 100644 --- a/api/src/main/java/me/lucko/luckperms/api/context/AbstractContextSet.java +++ b/api/src/main/java/me/lucko/luckperms/api/context/AbstractContextSet.java @@ -126,8 +126,7 @@ abstract class AbstractContextSet implements ContextSet { if (stringIsEmpty(key)) { throw new IllegalArgumentException("key is (effectively) empty"); } - - return key.toLowerCase().intern(); + return key.toLowerCase(); } static String sanitizeValue(String value) { @@ -135,8 +134,7 @@ abstract class AbstractContextSet implements ContextSet { if (stringIsEmpty(value)) { throw new IllegalArgumentException("value is (effectively) empty"); } - - return value.intern(); + return value; } private static boolean stringIsEmpty(String s) {