From c77ee07fcd4993c4971e834e705b234c307bc213 Mon Sep 17 00:00:00 2001 From: George Lin <17georgel@gmail.com> Date: Thu, 6 Jun 2019 15:34:45 +0800 Subject: [PATCH] Fix incorrect casting of CharSequence to String --- .../main/java/com/sk89q/worldedit/util/Direction.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Direction.java b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Direction.java index fa1d4d1a1..9948350fd 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/util/Direction.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/util/Direction.java @@ -22,13 +22,8 @@ package com.sk89q.worldedit.util; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.math.Vector3; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Optional; -import java.util.OptionalInt; - import javax.annotation.Nullable; +import java.util.*; /** * A collection of cardinal, ordinal, and secondary-ordinal directions. @@ -87,7 +82,7 @@ public enum Direction { } public static Direction get(CharSequence sequence) { - return map.get((String)sequence); + return map.get(sequence.toString()); } public Direction getLeft() {