aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/guard
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-10-02 13:09:46 +0000
committerGerrit Code Review <gerrit@onap.org>2018-10-02 13:09:46 +0000
commit1b34e893a66f6a7887d095b563ea17f97ab487a0 (patch)
treec2d8412dca9dab847cbbb79792bfd9f53fe6f420 /controlloop/common/guard
parent197ef30a917e2f6467d3a2825a3a4b91f005e164 (diff)
parent98bf012459c846d1c3906a5d1ead73cf26b8e195 (diff)
Merge "Fix remaining sonar"
Diffstat (limited to 'controlloop/common/guard')
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuard.java15
-rw-r--r--controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuardXacmlHelper.java12
2 files changed, 14 insertions, 13 deletions
diff --git a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuard.java b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuard.java
index 865a442b9..e4849cea5 100644
--- a/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuard.java
+++ b/controlloop/common/guard/src/main/java/org/onap/policy/guard/PolicyGuard.java
@@ -30,9 +30,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class PolicyGuard {
- private PolicyGuard() {
- // Cannot instantiate this static class
- }
private static final Logger logger = LoggerFactory.getLogger(PolicyGuard.class);
@@ -45,10 +42,6 @@ public class PolicyGuard {
private A parameterA;
private B parameterB;
- public static <A, B> LockResult<A, B> createLockResult(A parameterA, B parameterB) {
- return new LockResult<>(parameterA, parameterB);
- }
-
public LockResult(A parameterA, B parameterB) {
this.parameterA = parameterA;
this.parameterB = parameterB;
@@ -61,8 +54,16 @@ public class PolicyGuard {
public B getB() {
return parameterB;
}
+
+ public static <A, B> LockResult<A, B> createLockResult(A parameterA, B parameterB) {
+ return new LockResult<>(parameterA, parameterB);
+ }
}
+ private PolicyGuard() {
+ // Cannot instantiate this static class
+ }
+
/**
* Get the factory.
*
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 ec4ebf9cd..35b1d2561 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
@@ -54,6 +54,12 @@ public class PolicyGuardXacmlHelper {
// Constant for the systme line separator
private static final String SYSTEM_LS = System.lineSeparator();
+ private UrlEntry[] restUrls = null;
+ private int restUrlIndex = 0;
+
+ // REST timeout, initialized from 'pdpx.timeout' property
+ private int timeout = 20000;
+
public PolicyGuardXacmlHelper() {
init(PolicyEngine.manager.getEnvironment());
}
@@ -72,12 +78,6 @@ public class PolicyGuardXacmlHelper {
String environment = null;
}
- private UrlEntry[] restUrls = null;
- private int restUrlIndex = 0;
-
- // REST timeout, initialized from 'pdpx.timeout' property
- private int timeout = 20000;
-
/**
* Call PDP.
*