summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-common/src
diff options
context:
space:
mode:
authorArundathi Patil <arundpil@in.ibm.com>2018-08-23 19:04:44 +0530
committerArundathi Patil <arundpil@in.ibm.com>2018-08-24 08:37:22 +0000
commit181dc42d81e763bf6d81e263d609379c82a17203 (patch)
treec835dc7dfe007fc8b7f7dac2297b77222739deb6 /ecomp-portal-BE-common/src
parentc7684e595461b70b09d0d9ff15b5ad23aeabebc9 (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')
-rw-r--r--ecomp-portal-BE-common/src/main/java/org/onap/portalapp/command/PostSearchBean.java23
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