diff options
author | Manoop Talasila <talasila@research.att.com> | 2018-09-12 16:26:29 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-09-12 16:26:29 +0000 |
commit | 1b7a67049f756c2d44465b5291246d15bcfbe87f (patch) | |
tree | 711f9ae76374efb1c9ed49a1b9f0a1291ce8761a /ecomp-portal-BE-common/src/main/java/org | |
parent | e180363a23d26236a3ab5eea84cbe5d85bdb2bfa (diff) | |
parent | 181dc42d81e763bf6d81e263d609379c82a17203 (diff) |
Merge "PostSearchBean.java: fixed sonar issue"
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org')
-rw-r--r-- | ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java index c3837621..f5453a75 100644 --- a/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java +++ b/ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java @@ -3,6 +3,8 @@ * ONAP Portal * =================================================================== * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * + * Modifications Copyright (C) 2018 IBM. * =================================================================== * * Unless otherwise specified, all software contained herein is licensed @@ -372,20 +374,21 @@ public class PostSearchBean extends SearchBase { public boolean isCriteriaUpdated() { + final boolean flag = true; if(user==null&&userOrig==null) return false; else if(user==null||userOrig==null) return true; - else - return (! ( - Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&& - Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&& - //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&& - Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&& - Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&& - Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&& - Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId()))&& - true)); + else { + boolean value = Utilities.nvl(user.getFirstName()).equals(Utilities.nvl(userOrig.getFirstName()))&& + Utilities.nvl(user.getLastName()).equals(Utilities.nvl(userOrig.getLastName()))&& + //Utilities.nvl(user.getHrid()).equals(Utilities.nvl(userOrig.getHrid()))&& + Utilities.nvl(user.getOrgUserId()).equals(Utilities.nvl(userOrig.getOrgUserId()))&& + Utilities.nvl(user.getOrgCode()).equals(Utilities.nvl(userOrig.getOrgCode()))&& + Utilities.nvl(user.getEmail()).equals(Utilities.nvl(userOrig.getEmail()))&& + Utilities.nvl(user.getOrgManagerUserId()).equals(Utilities.nvl(userOrig.getOrgManagerUserId())); + return (!(value && flag)); + } } // isCriteriaUpdated } // PostSearchBean |