summaryrefslogtreecommitdiffstats
path: root/ONAP-XACML/src/main/java/org/onap
diff options
context:
space:
mode:
authorGao, Chenfei (cg287m) <cgao@research.att.com>2018-01-31 17:01:05 -0500
committerGao, Chenfei (cg287m) <cgao@research.att.com>2018-01-31 17:02:26 -0500
commit7d3735c062a378b4d5b05859e740c408fd2d0239 (patch)
tree05bfa17c5c85312205684823c5c29b31448739da /ONAP-XACML/src/main/java/org/onap
parent4d503f398d2f309cc077b55b5f1cce4c4bd773e6 (diff)
Continue addressing technical debt for ONAP-XACML
Follow the list of acceptable fixes in POLICY-336 description Issue-ID: POLICY-475 Change-Id: I67f46bb383db1ac4feecb0223df98d180733fc95 Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>
Diffstat (limited to 'ONAP-XACML/src/main/java/org/onap')
-rw-r--r--ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java8
-rw-r--r--ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java1
-rw-r--r--ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPGroup.java1
-rw-r--r--ONAP-XACML/src/main/java/org/onap/policy/xacml/util/XACMLPolicyWriter.java2
4 files changed, 5 insertions, 7 deletions
diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java
index d43a89000..3173bc16d 100644
--- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java
+++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdEngine.java
@@ -625,16 +625,16 @@ public class StdEngine extends StdPDPItemSetChangeNotifier implements PAPPolicyE
List<String> ids = new ArrayList<>();
for (PDPGroup group : this.groups) {
ids.add(group.getId());
- properties.setProperty(group.getId() + ".name", (group.getName() == null ? "" : group.getName()));
- properties.setProperty(group.getId() + ".description", (group.getDescription() == null ? "" : group.getDescription()));
+ properties.setProperty(group.getId() + ".name", group.getName() == null ? "" : group.getName());
+ properties.setProperty(group.getId() + ".description", group.getDescription() == null ? "" : group.getDescription());
//
// Iterate its PDPs
//
List<String> pdps = new ArrayList<>();
for (PDP pdp : group.getPdps()) {
pdps.add(pdp.getId());
- properties.setProperty(pdp.getId() + ".name", (pdp.getName() == null ? "" : pdp.getName()));
- properties.setProperty(pdp.getId() + ".description", (pdp.getDescription() == null ? "" : pdp.getDescription()));
+ properties.setProperty(pdp.getId() + ".name", pdp.getName() == null ? "" : pdp.getName());
+ properties.setProperty(pdp.getId() + ".description", pdp.getDescription() == null ? "" : pdp.getDescription());
if (pdp instanceof OnapPDP) {
properties.setProperty(pdp.getId() + ".jmxport", (((OnapPDP)pdp).getJmxPort()==0 ? "" : ((OnapPDP)pdp).getJmxPort()).toString());
}
diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java
index 21381c1a2..c66d11b8c 100644
--- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java
+++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java
@@ -21,7 +21,6 @@ package org.onap.policy.xacml.std.pap;
import java.io.Serializable;
import java.net.URI;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPGroup.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPGroup.java
index 745a43dca..9289c2461 100644
--- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPGroup.java
+++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/std/pap/StdPDPGroup.java
@@ -47,7 +47,6 @@ import org.onap.policy.xacml.std.pap.StdPDPItemSetChangeNotifier.StdItemSetChang
import com.att.research.xacml.api.pap.PAPException;
import com.att.research.xacml.api.pap.PDP;
-//import com.att.research.xacml.api.pap.PDPGroup;
import com.att.research.xacml.api.pap.PDPGroupStatus;
import com.att.research.xacml.api.pap.PDPGroupStatus.Status;
import com.att.research.xacml.api.pap.PDPPIPConfig;
diff --git a/ONAP-XACML/src/main/java/org/onap/policy/xacml/util/XACMLPolicyWriter.java b/ONAP-XACML/src/main/java/org/onap/policy/xacml/util/XACMLPolicyWriter.java
index 5e60e3730..0807f758b 100644
--- a/ONAP-XACML/src/main/java/org/onap/policy/xacml/util/XACMLPolicyWriter.java
+++ b/ONAP-XACML/src/main/java/org/onap/policy/xacml/util/XACMLPolicyWriter.java
@@ -252,7 +252,7 @@ public class XACMLPolicyWriter {
txtFileName = txtFileName.substring(0, txtFileName.lastIndexOf(".")+1) + origExtension;
txtFileName = configUrl+ File.separator + "Config" + File.separator + domain + txtFileName;
attributeValueType1.getContent().add(txtFileName);
- } else if (attributeAssignmentExpressionType.getAttributeId().equals("PolicyName")) {
+ } else if ("PolicyName".equals(attributeAssignmentExpressionType.getAttributeId())) {
JAXBElement<AttributeValueType> attributeValueType = (JAXBElement<AttributeValueType>) attributeAssignmentExpressionType.getExpression();
AttributeValueType attributeValueType1 = attributeValueType.getValue();
List<Object> contents = attributeValueType1.getContent();