From 618cd1b8fd6d756ad80aef028e254f41df650902 Mon Sep 17 00:00:00 2001 From: harshanl Date: Wed, 23 Dec 2015 15:30:42 +0530 Subject: [PATCH] Added null checks to GCM service. --- .../wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java index b00ae9639..19f594bc8 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.mobile.impl/src/main/java/org/wso2/carbon/device/mgt/mobile/impl/android/gcm/GCMUtil.java @@ -123,7 +123,7 @@ public class GCMUtil { //Set device reg-ids JsonArray regIds = new JsonArray(); for (String regId : registrationIds) { - if (regId == null && regId.isEmpty()) { + if (regId == null || regId.isEmpty()) { continue; } regIds.add(new JsonPrimitive(regId));