From ce7b28f2fb133591b0297a77d13ea6311edb6ac5 Mon Sep 17 00:00:00 2001 From: Menaka Jayawardena Date: Fri, 13 Oct 2017 15:21:53 +0530 Subject: [PATCH] Removed unthrown Exception. --- .../impl/admin/DeviceTypeManagementAdminServiceImpl.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java index 3cc9401449..57c0b7cde6 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/admin/DeviceTypeManagementAdminServiceImpl.java @@ -23,7 +23,6 @@ import org.apache.commons.logging.LogFactory; import org.wso2.carbon.device.mgt.common.DeviceManagementException; import org.wso2.carbon.device.mgt.common.InvalidConfigurationException; import org.wso2.carbon.device.mgt.common.spi.DeviceManagementService; -import org.wso2.carbon.device.mgt.common.spi.DeviceTypeGeneratorService; import org.wso2.carbon.device.mgt.core.dto.DeviceType; import org.wso2.carbon.device.mgt.jaxrs.beans.ErrorResponse; import org.wso2.carbon.device.mgt.jaxrs.service.api.admin.DeviceTypeManagementAdminService; @@ -89,8 +88,6 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen String msg = "Error occurred at server side while adding a device type."; log.error(msg, e); return Response.serverError().entity(msg).build(); - } catch (InvalidConfigurationException e) { - return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build(); } } else { return Response.status(Response.Status.BAD_REQUEST).build(); @@ -114,8 +111,6 @@ public class DeviceTypeManagementAdminServiceImpl implements DeviceTypeManagemen String msg = "Error occurred at server side while updating the device type."; log.error(msg, e); return Response.serverError().entity(msg).build(); - } catch (InvalidConfigurationException e) { - return Response.status(Response.Status.BAD_REQUEST).entity(e.getMessage()).build(); } } else { return Response.status(Response.Status.BAD_REQUEST).build();