Merge "Addressing Technical Debt for ONAP-XACML"
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / std / pap / StdPDP.java
index 20dbfae..e059ea6 100644 (file)
@@ -45,14 +45,16 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
        
        private Integer jmxport = 0;
        
-       private PDPStatus status = new StdPDPStatus();
+       private transient PDPStatus status = new StdPDPStatus();
        
-       private Set<PDPPolicy> policies = new HashSet<>();
+       private transient Set<PDPPolicy> policies = new HashSet<>();
        
-       private Set<PDPPIPConfig> pipConfigs = new HashSet<>();
+       private transient Set<PDPPIPConfig> pipConfigs = new HashSet<>();
        
        public StdPDP() {
-               
+               //
+               // Default constructor
+               //
        }
        
        public StdPDP(String id, Integer  jmxport) {
@@ -89,7 +91,6 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
                                } else if (key.toString().endsWith(".description")) {
                                        this.description = properties.getProperty(key.toString());
                                }else if (key.toString().endsWith(".jmxport")) {
-                                       //todo fix this hackjob
                                        if (properties.getProperty(key.toString()) != null && properties.getProperty(key.toString()).trim().length() > 0){
                                                logger.debug("initialize before: " + this.jmxport);
                                                this.jmxport = Integer.valueOf( properties.getProperty(key.toString()));
@@ -159,6 +160,8 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
        public void setPipConfigs(Set<PDPPIPConfig> pipConfigs) {
                this.pipConfigs = pipConfigs;
        }
+       
+       @Override
        public void setJmxPort(Integer jmxport) {
                this.jmxport = jmxport;
        }
@@ -210,13 +213,13 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
                if ( ! (o instanceof StdPDP)) {
                        return -1;
                }
-               if (((StdPDP)o).name == null) {
+               if (o.name == null) {
                        return -1;
                }
                if (name == null) {
                        return 1;
                }
-               return name.compareTo(((StdPDP)o).name);
+               return name.compareTo(o.name);
        }
        
 }