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

NPE in ApnsPayloadBuilder.setLocalizedAlertMessage #428

Closed
Shohou opened this issue Feb 24, 2017 · 2 comments
Closed

NPE in ApnsPayloadBuilder.setLocalizedAlertMessage #428

Shohou opened this issue Feb 24, 2017 · 2 comments
Labels
Milestone

Comments

@Shohou
Copy link

Shohou commented Feb 24, 2017

Javadoc for ApnsPayloadBuilder.setLocalizedAlertMessage says:

@param alertArguments arguments to populate placeholders in the localized alert string; may be {@code null}

But method will fail with NPE if null is passed as alertArgument in this row
this.localizedAlertArguments = alertArguments.length > 0 ? alertArguments : null;

Similar NPE will happen in other methods receiving vararg argument

@jchambers
Copy link
Owner

Well, that's embarrassing. Thanks for the report! We'll git it fixed shortly.

@jchambers jchambers added the bug label Feb 24, 2017
@jchambers jchambers added this to the v0.9.3 milestone Feb 24, 2017
jchambers added a commit that referenced this issue Apr 3, 2017
Check for null before checking argument array length (fixes #428)
@jchambers
Copy link
Owner

This has been fixed and will go out with v0.9.3. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants