From b61af92293584393ddd319f66f7957fcd73d9dc4 Mon Sep 17 00:00:00 2001 From: navodzoysa Date: Thu, 12 Sep 2024 00:26:15 +0530 Subject: [PATCH] Fix compile failure --- .../task/OperationConfigurationService.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java index fe7baac9fb..522f406a7b 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java @@ -68,14 +68,14 @@ public class OperationConfigurationService { try { metadataManagementService.createMetadata(metadata); - } catch (MetadataManagementException e) { - String msg = "Error occurred while adding operation configuration"; - log.error(msg, e); - throw new OperationConfigException(msg, e); } catch (MetadataKeyAlreadyExistsException e) { String msg = "Operation configuration already exists"; log.error(msg, e); throw new OperationConfigAlreadyExistsException(msg, e); + } catch (MetadataManagementException e) { + String msg = "Error occurred while adding operation configuration"; + log.error(msg, e); + throw new OperationConfigException(msg, e); } } @@ -99,14 +99,14 @@ public class OperationConfigurationService { try { metadataManagementService.deleteMetadata(OPERATION_CONFIG); - } catch (MetadataManagementException e) { - String msg = "Error occurred while deleting operation configuration"; - log.error(msg, e); - throw new OperationConfigException(msg, e); } catch (MetadataKeyNotFoundException e) { String msg = "Operation configuration already exists"; log.error(msg, e); throw new OperationConfigNotFoundException(msg, e); + } catch (MetadataManagementException e) { + String msg = "Error occurred while deleting operation configuration"; + log.error(msg, e); + throw new OperationConfigException(msg, e); } } -- 2.36.3