From 66ba857b82c6d87fd12ec642735d5d9a00c64bf6 Mon Sep 17 00:00:00 2001 From: 0xb00bface <0xboobface@gmail.com> Date: Sat, 17 Oct 2020 17:28:04 +0200 Subject: [PATCH] Fix bug in Recording.equals --- common/src/main/java/ctbrec/Recording.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/ctbrec/Recording.java b/common/src/main/java/ctbrec/Recording.java index 9394bda0..d422c4fd 100644 --- a/common/src/main/java/ctbrec/Recording.java +++ b/common/src/main/java/ctbrec/Recording.java @@ -232,13 +232,13 @@ public class Recording implements Serializable { return true; if (obj == null) return false; - if (getClass() != obj.getClass()) + if (!(obj instanceof Recording)) return false; Recording other = (Recording) obj; - if (id == null) { - if (other.id != null) + if (getId() == null) { + if (other.getId() != null) return false; - } else if (!id.equals(other.id)) + } else if (!getId().equals(other.getId())) return false; return true; }