Continue addressing technical debt for ONAP-XACML
[policy/engine.git] / ONAP-XACML / src / main / java / org / onap / policy / xacml / std / pap / StdPDP.java
index 4c1f4aa..8727b81 100644 (file)
@@ -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.
@@ -52,7 +52,9 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
        private transient Set<PDPPIPConfig> pipConfigs = new HashSet<>();
        
        public StdPDP() {
-               
+               //
+               // Default constructor
+               //
        }
        
        public StdPDP(String id, Integer  jmxport) {
@@ -158,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;
        }
@@ -206,16 +210,13 @@ public class StdPDP extends StdPDPItemSetChangeNotifier implements OnapPDP, Comp
                if (o == null) {
                        return -1;
                }
-               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);
        }
        
 }