Skip to content

Commit

Permalink
Merge pull request #1140 from /issues/1139-null-pointer-environment
Browse files Browse the repository at this point in the history
Fix #1139: NullPointerException when converting environment value
  • Loading branch information
romanstrobl authored Nov 14, 2024
2 parents ca3eca2 + 2d562e7 commit bd3404c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ private static MobilePlatform convert(final PushRegisterRequest.Platform source)
}

private static ApnsEnvironment convert(final PushRegisterRequest.Environment source) {
if (source == null) {
return null;
}
return switch (source) {
case DEVELOPMENT -> ApnsEnvironment.DEVELOPMENT;
case PRODUCTION -> ApnsEnvironment.PRODUCTION;
Expand Down

0 comments on commit bd3404c

Please sign in to comment.