From 529d1aec01e8a0e904b67b3235f0523e91718b44 Mon Sep 17 00:00:00 2001 From: Pahansith Date: Fri, 5 Jul 2024 21:05:07 +0530 Subject: [PATCH] Add doc comments --- .../push/notification/provider/fcm/util/FCMUtil.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/push/notification/provider/fcm/util/FCMUtil.java b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/push/notification/provider/fcm/util/FCMUtil.java index f7520801f6..0c6c433cc7 100644 --- a/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/push/notification/provider/fcm/util/FCMUtil.java +++ b/components/device-mgt-extensions/io.entgra.device.mgt.core.device.mgt.extensions.push.notification.provider.fcm/src/main/java/io/entgra/device/mgt/core/device/mgt/extensions/push/notification/provider/fcm/util/FCMUtil.java @@ -57,12 +57,17 @@ public class FCMUtil { fromStream(Files.newInputStream(serviceAccountPath)). createScoped(FCM_SCOPES); } catch (IOException e) { - log.error("Fail to initialize default OAuth application for FCM communication"); - throw new IllegalStateException(e); + String msg = "Fail to initialize default OAuth application for FCM communication"; + log.error(msg); + throw new IllegalStateException(msg, e); } } } + /** + * Initialize the context metadata properties from the cdm-config.xml. This file includes the fcm server URL + * to be invoked when sending the wakeup call to the device. + */ private void initContextConfigs() { PushNotificationConfiguration pushNotificationConfiguration = DeviceConfigurationManager.getInstance(). getDeviceManagementConfig().getPushNotificationConfiguration();