From 3efd9bfffb7c5adb082dee7513d0a17ecf22f1ad Mon Sep 17 00:00:00 2001 From: jmp Date: Tue, 15 Dec 2020 05:07:29 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Make=20CommandContext#asMap=20retur?= =?UTF-8?q?n=20an=20immutable=20copy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cloud/commandframework/context/CommandContext.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java b/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java index 0e9fee76..582926d0 100644 --- a/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java +++ b/cloud-core/src/main/java/cloud/commandframework/context/CommandContext.java @@ -208,7 +208,7 @@ public final class CommandContext { * @since 1.3.0 */ public @NonNull Map<@NonNull String, @Nullable ?> asMap() { - return Collections.unmodifiableMap(this.internalStorage); + return Collections.unmodifiableMap(new HashMap<>(this.internalStorage)); } /**