X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Fstd%2Fpap%2FStdPDPStatus.java;h=e42d544463785cd4cb90848b9e8d1c922c150906;hb=bf298f2be48f54c4906100e8e7a53c1f6e8da52e;hp=f8759956ca3219532f03222d944014382ea7c6a5;hpb=073cc188efe9abb4c010cf674e34e2cf46ef1c52;p=policy%2Fengine.git diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPStatus.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPStatus.java index f8759956c..e42d54446 100644 --- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPStatus.java +++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPStatus.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-XACML * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,17 +38,20 @@ public class StdPDPStatus implements Serializable, PDPStatus { private Set loadWarnings = new HashSet<>(); - private Set loadedPolicies = new HashSet<>(); + private transient Set loadedPolicies = new HashSet<>(); - private Set loadedRootPolicies = new HashSet<>(); + private transient Set loadedRootPolicies = new HashSet<>(); - private Set failedPolicies = new HashSet<>(); + private transient Set failedPolicies = new HashSet<>(); - private Set loadedPIPConfigs = new HashSet<>(); + private transient Set loadedPIPConfigs = new HashSet<>(); - private Set failedPIPConfigs = new HashSet<>(); + private transient Set 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