diff options
author | 2018-08-23 19:04:44 +0530 | |
---|---|---|
committer | 2018-08-24 08:37:22 +0000 | |
commit | 181dc42d81e763bf6d81e263d609379c82a17203 (patch) | |
tree | c835dc7dfe007fc8b7f7dac2297b77222739deb6 /ecomp-portal-BE-common/src/main/java/org/onap | |
parent | c7684e595461b70b09d0d9ff15b5ad23aeabebc9 (diff) |
PostSearchBean.java: fixed sonar issue
Fixed sonar issue, reduce numeber of conditional operator in expression
Issue-ID: PORTAL-373
Change-Id: Ic0c8a2cab9643f23e490d2fe09f0d1aa45bd73c0
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
Diffstat (limited to 'ecomp-portal-BE-common/src/main/java/org/onap')
-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 |