Merge "Addressing Technical Debt for ONAP-XACML"
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / std / pap / StdPDPStatus.java
index f875995..6e1f2d6 100644 (file)
@@ -38,17 +38,20 @@ public class StdPDPStatus implements Serializable, PDPStatus {
        
        private Set<String> loadWarnings = new HashSet<>();
        
-       private Set<PDPPolicy> loadedPolicies = new HashSet<>();
+       private transient Set<PDPPolicy> loadedPolicies = new HashSet<>();
        
-       private Set<PDPPolicy> loadedRootPolicies = new HashSet<>();
+       private transient Set<PDPPolicy> loadedRootPolicies = new HashSet<>();
        
-       private Set<PDPPolicy> failedPolicies = new HashSet<>();
+       private transient Set<PDPPolicy> failedPolicies = new HashSet<>();
        
-       private Set<PDPPIPConfig>       loadedPIPConfigs = new HashSet<>();
+       private transient Set<PDPPIPConfig>     loadedPIPConfigs = new HashSet<>();
        
-       private Set<PDPPIPConfig>       failedPIPConfigs = new HashSet<>();
+       private transient Set<PDPPIPConfig>     failedPIPConfigs = new HashSet<>();
        
        public StdPDPStatus() {
+               //
+               // Default constructor
+               //
        }
 
        public void set(StdPDPStatus newStatus) {
@@ -151,7 +154,7 @@ public class StdPDPStatus implements Serializable, PDPStatus {
 
        @Override
        public boolean policiesOK() {
-               if (this.failedPolicies.size() > 0) {
+               if (!this.failedPolicies.isEmpty()) {
                        return false;
                }
                return true;
@@ -185,7 +188,7 @@ public class StdPDPStatus implements Serializable, PDPStatus {
 
        @Override
        public boolean pipConfigOK() {
-               if (this.failedPIPConfigs.size() > 0) {
+               if (!this.failedPIPConfigs.isEmpty()) {
                        return false;
                }
                return true;
@@ -194,13 +197,13 @@ public class StdPDPStatus implements Serializable, PDPStatus {
        @Override
        @JsonIgnore
        public boolean isOk() {
-               if (this.policiesOK() == false) {
+               if (!this.policiesOK()) {
                        return false;
                }
-               if (this.pipConfigOK() == false) {
+               if (!this.pipConfigOK()) {
                        return false;
                }
-               return (this.status == Status.UP_TO_DATE);
+               return this.status == Status.UP_TO_DATE;
        }
 
        @Override