summaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard/src/main/java
diff options
context:
space:
mode:
authorHockla, Ali (ah999m) <ah999m@att.com>2017-10-04 11:58:13 -0500
committerHockla, Ali (ah999m) <ah999m@att.com>2017-10-04 11:58:28 -0500
commitcfbf99e5c9c673b35989aa09a6551b226b59688c (patch)
treec6f7722f9cb886d4c0a61a9658ec6827eba93a5c /controlloop/common/guard/src/main/java
parent9f789fa6c2d9d58685c1e20eaf3216f45deee5e7 (diff)
Fixed Sonar blockers/criticals
Issue-ID: POLICY-292 Change-Id: Id53e9d3b6ba23b20d7e45d4d3b39f8092f126333 Signed-off-by: Hockla, Ali (ah999m) <ah999m@att.com>
Diffstat (limited to 'controlloop/common/guard/src/main/java')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java6
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java4
2 files changed, 5 insertions, 5 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
index 9ee6f2310..57f520894 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PIPEngineGetHistory.java
@@ -408,9 +408,9 @@ public class PIPEngineGetHistory extends StdConfigurableEngine{
+ " and endtime between '" + new Timestamp(diff) + "' and '" + new Timestamp(now) + "'";
Query nq = em.createNativeQuery(sql);
- nq.setParameter(1, actor);
- nq.setParameter(2, operation);
- nq.setParameter(3, target);
+ nq.setParameter(0, actor);
+ nq.setParameter(1, operation);
+ nq.setParameter(2, target);
int ret = -1;
try{
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
index f5a93d8be..908a3aff9 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java
@@ -234,9 +234,9 @@ public class PolicyGuardXacmlHelper {
//
// Connection may have failed, return Indeterminate
//
- if(response == null || "".equals(response)){
+ if(response == null || response.isEmpty()){
return Util.INDETERMINATE;
- }
+ }
}
rawDecision = new JSONObject(response).getString("decision");