diff --git a/skJson.iml b/skJson.iml index fa35b32c..c4622759 100644 --- a/skJson.iml +++ b/skJson.iml @@ -1,5 +1,5 @@ - + @@ -9,69 +9,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/main/java/cz/coffee/core/utils/Util.java b/src/main/java/cz/coffee/core/utils/Util.java index b5b9dfdb..023bc8b5 100644 --- a/src/main/java/cz/coffee/core/utils/Util.java +++ b/src/main/java/cz/coffee/core/utils/Util.java @@ -40,6 +40,7 @@ public class Util { private static long START_TIME; + public static final String DEFAULT_DELIMITER = "::"; public static final Gson GSON_ADAPTER = new GsonBuilder().serializeNulls().enableComplexMapKeySerialization().disableHtmlEscaping() .registerTypeHierarchyAdapter(ConfigurationSerializable.class, new Adapters.TypeAdapter.BukkitAdapter()).create(); @@ -91,7 +92,7 @@ public static String hex(Object object) { public static LinkedList extractKeys(String string, String delimiter, boolean ...rawAdd) { boolean add = rawAdd != null && rawAdd.length > 0 && rawAdd[0]; - delimiter = delimiter == null ? ":(?![{}])" : delimiter; + delimiter = delimiter == null ? (DEFAULT_DELIMITER + "(?![{}])") : delimiter; if (string == null) return null; LinkedList extractedKeys = new LinkedList<>(); final Pattern squareBrackets = Pattern.compile(".*\\[((\\d+|)])");