Skip to content

Commit

Permalink
Fix #1139: NullPointerException when converting environment value
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl committed Nov 14, 2024
1 parent ca3eca2 commit 2d562e7
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 2d562e7

Please sign in to comment.