From 9886e2e75f5a65a7402749922e1ea92faac30982 Mon Sep 17 00:00:00 2001 From: charitha Date: Mon, 26 Sep 2016 17:57:44 +0530 Subject: [PATCH] Merge branch 'carbon-kernel-4.4.3' of https://github.com/wso2/carbon-device-mgt-plugins into carbon-kernel-4.4.3 # Conflicts: # components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/bean/ApplicationInstallation.java (cherry picked from commit 257d6cd) --- .../DeviceManagementAdminServiceImpl.java | 24 ------------------- 1 file changed, 24 deletions(-) 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/services/impl/DeviceManagementAdminServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java index 2ed0a554a..9cccf1699 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java @@ -531,18 +531,6 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe throw new BadRequestException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); } - String scheduledTime = applicationInstallationBeanWrapper.getOperation().getSchedule(); - if (scheduledTime != null && !scheduledTime.isEmpty()) { - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); - try { - String formattedScheduledDate = format.format(format.parse(scheduledTime)); - applicationInstallationBeanWrapper.getOperation().setSchedule(formattedScheduledDate); - } catch (ParseException e) { - String errorMessage = "Invalid date string is provided in for schedule parameter"; - throw new BadRequestException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); - } - } ApplicationInstallation applicationInstallation = applicationInstallationBeanWrapper.getOperation(); validateApplicationUrl(applicationInstallation.getUrl()); @@ -593,18 +581,6 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe throw new BadRequestException( new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); } - String scheduledTime = applicationUpdateBeanWrapper.getOperation().getSchedule(); - if (scheduledTime != null && !scheduledTime.isEmpty()) { - SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); - try { - String formattedScheduledDate = format.format(format.parse(scheduledTime)); - applicationUpdateBeanWrapper.getOperation().setSchedule(formattedScheduledDate); - } catch (ParseException e) { - String errorMessage = "Invalid date string is provided in for schedule parameter"; - throw new BadRequestException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(errorMessage).build()); - } - } ApplicationUpdate applicationUpdate = applicationUpdateBeanWrapper.getOperation(); validateApplicationUrl(applicationUpdate.getUrl()); validateApplicationType(applicationUpdate.getType());