From 3ae80c742601743ad0d4866736b59e007f869ea9 Mon Sep 17 00:00:00 2001 From: hsgamer Date: Mon, 16 Oct 2023 00:08:55 +0700 Subject: [PATCH] should hash PathString as a array --- .../me/hsgamer/bettergui/util/CaseInsensitivePathString.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/hsgamer/bettergui/util/CaseInsensitivePathString.java b/src/main/java/me/hsgamer/bettergui/util/CaseInsensitivePathString.java index 137ca844..fa8a5804 100644 --- a/src/main/java/me/hsgamer/bettergui/util/CaseInsensitivePathString.java +++ b/src/main/java/me/hsgamer/bettergui/util/CaseInsensitivePathString.java @@ -32,10 +32,10 @@ public boolean equals(Object o) { @Override public int hashCode() { String[] thisPath = this.pathString.getPath(); - String[] lowerPath = new String[thisPath.length]; + Object[] lowerPath = new String[thisPath.length]; for (int i = 0; i < thisPath.length; i++) { lowerPath[i] = thisPath[i].toLowerCase(); } - return Objects.hash((Object) lowerPath); + return Objects.hash(lowerPath); } }