binchoo / PaimonGanyu

여행 비서 페이몬! Genshin Impact AWS workflows & KakaoTalk chatbot skills
https://pf.kakao.com/_mtPFb
GNU General Public License v3.0
7 stars 1 forks source link

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

Closed binchoo closed 1 year ago

binchoo commented 1 year ago

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. https://github.com/binchoo/PaimonGanyu/blob/a5245d709485e039a60ef0d4dbcb2cdbdf75350e/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/main/java/org/binchoo/paimonganyu/chatbot/views/redeem/RedeemListView.java#L112-L118

To-be: Line 85: should inject a temporary region value for deleted uids. https://github.com/binchoo/PaimonGanyu/blob/a5245d709485e039a60ef0d4dbcb2cdbdf75350e/PaimonGanyu/paimonganyu-app/paimonganyu-skill/src/main/java/org/binchoo/paimonganyu/chatbot/views/redeem/UidRedeem.java#L84-L89

binchoo commented 1 year ago

image