From a21c374b000b3a24d85f8651f82de48322992e8a Mon Sep 17 00:00:00 2001 From: Harshan Liyanage Date: Mon, 19 Jun 2017 12:52:31 +0530 Subject: [PATCH] Code refactoring. --- .../mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java index 796a618bc1..2699c7c4b5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/DeviceManagementServiceImpl.java @@ -147,7 +147,7 @@ public class DeviceManagementServiceImpl implements DeviceManagementService { // check whether the user is device-mgt admin if (deviceAccessAuthorizationService.isDeviceAdminUser()) { - if ((user != null && !user.isEmpty())) { + if (user != null && !user.isEmpty()) { request.setOwner(MultitenantUtils.getTenantAwareUsername(user)); } else if (userPattern != null && !userPattern.isEmpty()) { request.setOwnerPattern(userPattern);