From 6f277cbe92e4a9b3759763fb727d2732c4aa0a60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Kr=C3=BCger?= Date: Thu, 28 Apr 2022 17:57:30 +0200 Subject: [PATCH] Fix new introduced SpotBugs error and warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Krüger --- .../com/nextcloud/talk/models/json/chat/ChatShareOCS.java | 5 ++--- .../nextcloud/talk/models/json/chat/ChatShareOverall.java | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOCS.java b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOCS.java index e869c5ee0..6f0191037 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOCS.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOCS.java @@ -30,7 +30,7 @@ import java.util.Objects; @Parcel @JsonObject -public class ChatShareOCS extends GenericOCS { +public class ChatShareOCS { @JsonField(name = "data") public HashMap data; @@ -67,8 +67,7 @@ public class ChatShareOCS extends GenericOCS { final int PRIME = 59; int result = 1; final Object $data = this.getData(); - result = result * PRIME + ($data == null ? 43 : $data.hashCode()); - return result; + return result * PRIME + ($data == null ? 43 : $data.hashCode()); } public String toString() { diff --git a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOverall.java b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOverall.java index b489e747a..ce97b53e6 100644 --- a/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOverall.java +++ b/app/src/main/java/com/nextcloud/talk/models/json/chat/ChatShareOverall.java @@ -66,8 +66,7 @@ public class ChatShareOverall { final int PRIME = 59; int result = 1; final Object $ocs = this.getOcs(); - result = result * PRIME + ($ocs == null ? 43 : $ocs.hashCode()); - return result; + return result * PRIME + ($ocs == null ? 43 : $ocs.hashCode()); } public String toString() {