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 + "'" + '}'; }