Skip to content

fix(pinpoint): Fix Pinpoint NullPointerException#3007

Merged
tjleing merged 2 commits into
mainfrom
leint/pinpoint-npe
Sep 23, 2022
Merged

fix(pinpoint): Fix Pinpoint NullPointerException#3007
tjleing merged 2 commits into
mainfrom
leint/pinpoint-npe

Conversation

@tjleing

@tjleing tjleing commented Sep 16, 2022

Copy link
Copy Markdown
Contributor

Fixes #3001 hopefully!

Bug: when using reflection, if the first round of class instantiation (initClassAndMethodsByReflection()) goes successfully but then the second round fails (buildMethodsByReflection()), future calls to createNotification() will incorrectly believe that the entire reflection process resolved and attempt to use the invalid methods.

Fix: set notificationBuilderClass back to null if the process doesn't work at any stage, so it won't skip. Also added NPE catch blocks just in case.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tjleing tjleing requested a review from a team as a code owner September 16, 2022 21:10
@sktimalsina sktimalsina changed the title (fix: pinpoint) Fix Pinpoint NullPointerException fix: (pinpoint) Fix Pinpoint NullPointerException Sep 17, 2022
@sktimalsina sktimalsina changed the title fix: (pinpoint) Fix Pinpoint NullPointerException fix(pinpoint): Fix Pinpoint NullPointerException Sep 17, 2022
@tjleing tjleing merged commit a1781bd into main Sep 23, 2022
@tjleing tjleing deleted the leint/pinpoint-npe branch September 23, 2022 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null Pointer Exception when Creating a Notification in Pinpoint

3 participants