Skip to content

Commit

Permalink
Fix #1139: NullPointerException when converting environment value (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
romanstrobl authored Nov 14, 2024
1 parent 05bb3e6 commit 0ed5898
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 0ed5898

Please sign in to comment.