From bcf33bd5dfec75f93bc9db20d23e36bea0a1ee33 Mon Sep 17 00:00:00 2001 From: Mirco Ianese Date: Mon, 19 Aug 2024 22:59:24 +0200 Subject: [PATCH] fix --- .../model/chatboost/source/ChatBoostSourceUnknown.java | 9 +++++---- .../model/message/origin/MessageOriginUnknown.java | 4 +--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/library/src/main/java/com/pengrad/telegrambot/model/chatboost/source/ChatBoostSourceUnknown.java b/library/src/main/java/com/pengrad/telegrambot/model/chatboost/source/ChatBoostSourceUnknown.java index 29c6d977..a430fa06 100644 --- a/library/src/main/java/com/pengrad/telegrambot/model/chatboost/source/ChatBoostSourceUnknown.java +++ b/library/src/main/java/com/pengrad/telegrambot/model/chatboost/source/ChatBoostSourceUnknown.java @@ -10,15 +10,16 @@ public class ChatBoostSourceUnknown extends ChatBoostSource implements Serializa public final static String CHAT_BOOST_TYPE = "unknown"; @Override - public int hashCode() { - return Objects.hash(source, user); + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + return true; } @Override public String toString() { return "ChatBoostSourceUnknown{" + - "source='" + source + "'," + - "user='" + user + "'" + '}'; } } diff --git a/library/src/main/java/com/pengrad/telegrambot/model/message/origin/MessageOriginUnknown.java b/library/src/main/java/com/pengrad/telegrambot/model/message/origin/MessageOriginUnknown.java index d8700ade..c924a05a 100644 --- a/library/src/main/java/com/pengrad/telegrambot/model/message/origin/MessageOriginUnknown.java +++ b/library/src/main/java/com/pengrad/telegrambot/model/message/origin/MessageOriginUnknown.java @@ -20,12 +20,10 @@ public boolean equals(Object o) { return true; } - + @Override public String toString() { return "MessageOriginUnknown{" + - "type='" + type + "'," + - "date='" + date + "'" + '}'; }