Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Redeem][Application] Given a UidRedeem for deleted uid, NullPointerException occurs and ListUserRedeemView cannot be processed. #28

Closed
binchoo opened this issue Sep 21, 2022 · 1 comment
Assignees
Labels
bug Something isn't working dmn: redeem hotfix update this feature to current release mdl: application stk: paimonganyu-skill

Comments

@binchoo
Copy link
Owner

binchoo commented Sep 21, 2022

As-is:

Sep 21 02:44:05 ip-172-31-1-97 web: java.lang.NullPointerException: null
Sep 21 02:44:05 ip-172-31-1-97 web: at org.binchoo.paimonganyu.chatbot.views.redeem.UidRedeem.getRegion(UidRedeem.java:52) ~[classes!/:na]
Sep 21 02:44:05 ip-172-31-1-97 web: at org.binchoo.paimonganyu.chatbot.views.redeem.RedeemListView.renderImageTitle(RedeemListView.java:114) ~[classes!/:na]

Line 114: produces NullPointerException when the region value is null.

private ImageTitle renderImageTitle(UidRedeem uidRedeem) {
return ImageTitle.builder()
.title(String.format(FORMAT_CHARACTER_INFO, uidRedeem.getRegion(), uidRedeem.getCharacterLevel(), uidRedeem.getCharacterName()))
.description(String.format(FORMAT_UID, uidRedeem.getUidString()))
.imageUrl(profileImageStrategy(uidRedeem.isLumine()))
.build();
}

To-be:
Line 85: should inject a temporary region value for deleted uids.

private static Uid nonExisting(String uid) {
return Uid.builder()
.uidString(uid)
.characterName("Deleted uid.")
.build();
}

@binchoo binchoo added bug Something isn't working hotfix update this feature to current release mdl: application dmn: redeem stk: paimonganyu-skill labels Sep 21, 2022
@binchoo binchoo self-assigned this Sep 21, 2022
binchoo added a commit that referenced this issue Sep 21, 2022
@binchoo
Copy link
Owner Author

binchoo commented Sep 21, 2022

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dmn: redeem hotfix update this feature to current release mdl: application stk: paimonganyu-skill
Projects
None yet
Development

No branches or pull requests

1 participant