-
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solve "StackOverflowException" on BackgroundTypeAdapter when the obje…
…ct is of an incompatible type
- Loading branch information
1 parent
a2a5b3d
commit 56ef37a
Showing
2 changed files
with
27 additions
and
6 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
...ary/src/main/java/com/pengrad/telegrambot/model/chatbackground/BackgroundTypeUnknown.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.pengrad.telegrambot.model.chatbackground; | ||
|
||
import java.util.Objects; | ||
|
||
public class BackgroundTypeUnknown extends BackgroundType { | ||
|
||
public static final String TYPE = "unknown"; | ||
|
||
public BackgroundTypeUnknown() { | ||
super(TYPE); | ||
} | ||
|
||
@Override | ||
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 "BackgroundTypeUnknown{" + | ||
'}'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters