-
-
Notifications
You must be signed in to change notification settings - Fork 381
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 TransactionPartnerTypeAdapter when …
…the object is of an incompatible type
- Loading branch information
1 parent
735c5fe
commit fdba222
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
.../src/main/java/com/pengrad/telegrambot/model/stars/partner/TransactionPartnerUnknown.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,29 @@ | ||
package com.pengrad.telegrambot.model.stars.partner; | ||
|
||
import com.pengrad.telegrambot.model.stars.withdrawal.RevenueWithdrawalState; | ||
|
||
import java.util.Objects; | ||
|
||
public class TransactionPartnerUnknown extends TransactionPartner { | ||
|
||
public final static String TYPE = "unknown"; | ||
|
||
public TransactionPartnerUnknown() { | ||
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 "TransactionPartnerUnknown{" + | ||
"type='" + type() + "\'" + | ||
'}'; | ||
} | ||
|
||
} |
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