diff --git a/gcp-firebase/src/main/java/com/baeldung/gcp/firebase/publisher/controller/FirebasePublisherController.java b/gcp-firebase/src/main/java/com/baeldung/gcp/firebase/publisher/controller/FirebasePublisherController.java index ca7467531e..f926c0ef88 100644 --- a/gcp-firebase/src/main/java/com/baeldung/gcp/firebase/publisher/controller/FirebasePublisherController.java +++ b/gcp-firebase/src/main/java/com/baeldung/gcp/firebase/publisher/controller/FirebasePublisherController.java @@ -2,6 +2,7 @@ package com.baeldung.gcp.firebase.publisher.controller; import java.util.List; +import java.util.Arrays; import java.util.stream.Collectors; import org.springframework.http.HttpStatus; @@ -103,7 +104,7 @@ public class FirebasePublisherController { @DeleteMapping("/subscriptions/{topic}/{registrationToken}") public ResponseEntity deleteSubscription(@PathVariable String topic, @PathVariable String registrationToken) throws FirebaseMessagingException { - fcm.subscribeToTopic(List.of(registrationToken), topic); + fcm.subscribeToTopic(Arrays.asList(registrationToken), topic); return ResponseEntity.ok().build(); } }