From 8e06a7603b6e0ccae979167dd2031d134419f0c1 Mon Sep 17 00:00:00 2001 From: Max Roncace Date: Tue, 27 Mar 2018 15:18:54 -0400 Subject: [PATCH] Fix JarClassEntry equals implementation --- build.gradle | 2 +- .../java/blue/lapis/nocturne/jar/model/JarClassEntry.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 307243f..e31775e 100644 --- a/build.gradle +++ b/build.gradle @@ -16,7 +16,7 @@ defaultTasks 'clean', 'licenseFormat', 'build' // Project information allprojects { group = 'blue.lapis.nocturne' - version = '1.1.1' + version = '1.1.2' sourceCompatibility = '1.8' targetCompatibility = '1.8' diff --git a/src/main/java/blue/lapis/nocturne/jar/model/JarClassEntry.java b/src/main/java/blue/lapis/nocturne/jar/model/JarClassEntry.java index ad28f49..8d88320 100644 --- a/src/main/java/blue/lapis/nocturne/jar/model/JarClassEntry.java +++ b/src/main/java/blue/lapis/nocturne/jar/model/JarClassEntry.java @@ -204,12 +204,12 @@ public Map getCurrentMethods() { @Override public boolean equals(Object otherObject) { - return otherObject instanceof JarClassEntry && hashCode() == otherObject.hashCode(); + return otherObject instanceof JarClassEntry && getName().equals(((JarClassEntry) otherObject).getName()); } @Override public int hashCode() { - return Objects.hash(getName()); + return Objects.hash(JarClassEntry.class, getName()); } private static void showDecompileDialog() {