Merge "Sonar - Major blocker issue fix"
authorSunder Tattavarada <statta@research.att.com>
Wed, 29 Apr 2020 19:39:33 +0000 (19:39 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 29 Apr 2020 19:39:33 +0000 (19:39 +0000)
ecomp-portal-BE-common/src/main/java/org/onap/portalapp/portal/controller/RolesApprovalSystemController.java

index 5562caa..487cc4d 100644 (file)
@@ -219,9 +219,9 @@ public class RolesApprovalSystemController implements BasicAuthenticationControl
         *             If any field is missing.
         */
        private void validateExtSystemUser(ExternalSystemUser extSysUser, boolean rolesRequired) throws Exception {
-               if (extSysUser.getLoginId() == null || extSysUser.getLoginId() == "")
+               if (extSysUser.getLoginId() == null || extSysUser.getLoginId().equals(""))
                        throw new Exception("Request has no login ID");
-               if (extSysUser.getApplicationName() == null || extSysUser.getApplicationName() == "")
+               if (extSysUser.getApplicationName() == null || extSysUser.getApplicationName().equals(""))
                        throw new Exception("Request has no application name");
                if (extSysUser.getMyloginrequestId() == null)
                        throw new Exception("Request has no request ID");