diff options
author | liamfallon <liam.fallon@est.tech> | 2019-10-24 21:33:45 -0400 |
---|---|---|
committer | liamfallon <liam.fallon@est.tech> | 2019-10-24 21:50:19 -0400 |
commit | c2ca6ea5cb44103903e1409e8dd6db80167e61e8 (patch) | |
tree | a713b7e2d83a2492d4141881eb886c82a3a10647 /ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java | |
parent | 766f999081e73b301062f1b96bffb9c52d7e9852 (diff) |
CHeckstyle and JUnit for base package in ONAP-REST
Added unit tests and fixed checkstyle and SONAR issues in the base
package of ONAPE-REST
There was a lot of knock-on automatic changes done by Eclipse when I
renamed the class XACMLRestProperties to XacmlRestProperties so ignore
the changes in all but the ONAP-REST package. I also didn't update the
licenses on files on those classes because the changes were automatic.
Issue-ID: POLICY-2131
Change-Id: I28823c844b5192f8d56de76a727996b13e7ea4a6
Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java')
-rw-r--r-- | ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java index 66a74a44f..56d82bd3f 100644 --- a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java +++ b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/XACMLPdpRegisterThread.java @@ -37,7 +37,7 @@ import java.util.UUID; import org.apache.commons.io.IOUtils; import org.onap.policy.pdp.rest.XACMLPdpServlet.PutRequest; -import org.onap.policy.rest.XACMLRestProperties; +import org.onap.policy.rest.XacmlRestProperties; import org.onap.policy.xacml.api.XACMLErrorConstants; import com.att.research.xacml.util.XACMLProperties; @@ -86,7 +86,7 @@ public class XACMLPdpRegisterThread implements Runnable { /* int seconds; try { - seconds = Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_REGISTER_SLEEP)); + seconds = Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PDP_REGISTER_SLEEP)); } catch (NumberFormatException e) { LOGGER.error( XACMLErrorConstants.ERROR_SYSTEM_ERROR +"REGISTER_SLEEP: ", e); seconds = 5; @@ -96,7 +96,7 @@ public class XACMLPdpRegisterThread implements Runnable { } int retries; try { - retries = Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_REGISTER_RETRIES)); + retries = Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PDP_REGISTER_RETRIES)); } catch (NumberFormatException e) { LOGGER.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR +" REGISTER_SLEEP: ", e); retries = -1; @@ -130,7 +130,7 @@ public class XACMLPdpRegisterThread implements Runnable { // // Get the list of PAP Servlet URLs from the property file // - //String papUrlList = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_URL); + //String papUrlList = XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_URL); //String[] papUrls = papUrlList.split(","); //PapUrlResolver.setPapUrls(papUrls); URL url = new URL(papUrls.getUrl()); @@ -149,8 +149,8 @@ public class XACMLPdpRegisterThread implements Runnable { connection.setRequestProperty("Authorization", "Basic " + encoding); connection.setRequestProperty("Accept", "text/x-java-properties"); connection.setRequestProperty("Content-Type", "text/x-java-properties"); - connection.setRequestProperty(XACMLRestProperties.PROP_PDP_HTTP_HEADER_ID, XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_ID)); - connection.setRequestProperty(XACMLRestProperties.PROP_PDP_HTTP_HEADER_JMX_PORT, XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_JMX_PORT)); + connection.setRequestProperty(XacmlRestProperties.PROP_PDP_HTTP_HEADER_ID, XACMLProperties.getProperty(XacmlRestProperties.PROP_PDP_ID)); + connection.setRequestProperty(XacmlRestProperties.PROP_PDP_HTTP_HEADER_JMX_PORT, XACMLProperties.getProperty(XacmlRestProperties.PROP_PDP_JMX_PORT)); connection.setRequestProperty("X-ECOMP-RequestID", requestID.toString()); connection.setUseCaches(false); // |