diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java index cb65fc6f0..46315c203 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/util/AndroidAPIUtils.java @@ -122,9 +122,10 @@ public class AndroidAPIUtils { throw new BadRequestException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); } - DeviceIdentifier deviceIdentifier = new DeviceIdentifier(); + DeviceIdentifier deviceIdentifier; List deviceids = new ArrayList<>(); for (String deviceId : deviceIDs) { + deviceIdentifier = new DeviceIdentifier(); deviceIdentifier.setId(deviceId); deviceIdentifier.setType(AndroidConstants.DEVICE_TYPE_ANDROID); deviceids.add(deviceIdentifier);