Removing some deprecated types/warnings
diff --git a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/std/functions/FunctionDefinitionURIStringConcatenateTest.java b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/std/functions/FunctionDefinitionURIStringConcatenateTest.java index 69311ca..341fb63 100644 --- a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/std/functions/FunctionDefinitionURIStringConcatenateTest.java +++ b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/std/functions/FunctionDefinitionURIStringConcatenateTest.java
@@ -42,6 +42,7 @@ * Test of PDP Functions (See XACML core spec section A.3) TO RUN - use jUnit In Eclipse select this file or * the enclosing directory, right-click and select Run As/JUnit Test */ +@SuppressWarnings("deprecation") public class FunctionDefinitionURIStringConcatenateTest { /* @@ -54,7 +55,6 @@ */ List<FunctionArgument> arguments = new ArrayList<FunctionArgument>(); - @SuppressWarnings("deprecation") @Test public void testURI_string_concatenate() {
diff --git a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/TestBase.java b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/TestBase.java index 170a035..717f696 100644 --- a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/TestBase.java +++ b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/TestBase.java
@@ -51,7 +51,7 @@ import java.util.regex.Pattern; import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.HelpFormatter; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; @@ -263,8 +263,7 @@ // // Parse the command line options // - CommandLine cl; - cl = new GnuParser().parse(options, args); + CommandLine cl = new DefaultParser().parse(options, args); // // Check for what we have //
diff --git a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/custom/TestCustom.java b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/custom/TestCustom.java index 995d766..61c13b7 100644 --- a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/custom/TestCustom.java +++ b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/custom/TestCustom.java
@@ -52,7 +52,7 @@ import javax.crypto.NoSuchPaddingException; import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Option; import org.apache.commons.cli.ParseException; import org.apache.commons.logging.Log; @@ -160,8 +160,7 @@ // // Parse the command line options // - CommandLine cl; - cl = new GnuParser().parse(options, args); + CommandLine cl = new DefaultParser().parse(options, args); if (cl.hasOption(OPTION_GENERATE)) { // // Really only need to do this once to setup the test.
diff --git a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/policy/TestPolicy.java b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/policy/TestPolicy.java index f2a8cdf..2ea07d4 100644 --- a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/policy/TestPolicy.java +++ b/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/policy/TestPolicy.java
@@ -60,7 +60,7 @@ import oasis.names.tc.xacml._3_0.core.schema.wd_17.RequestType; import org.apache.commons.cli.CommandLine; -import org.apache.commons.cli.GnuParser; +import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Option; import org.apache.commons.cli.ParseException; import org.apache.commons.logging.Log; @@ -139,8 +139,7 @@ // // Look for the policy option // - CommandLine cl; - cl = new GnuParser().parse(options, args); + CommandLine cl = new DefaultParser().parse(options, args); if (cl.hasOption(OPTION_POLICY)) { this.policy = Paths.get(cl.getOptionValue(OPTION_POLICY)); //
diff --git a/openaz-xacml/src/main/java/org/apache/openaz/xacml/std/pip/engines/ldap/ConfigurableLDAPResolver.java b/openaz-xacml/src/main/java/org/apache/openaz/xacml/std/pip/engines/ldap/ConfigurableLDAPResolver.java index 53d3a12..2b9a5e3 100644 --- a/openaz-xacml/src/main/java/org/apache/openaz/xacml/std/pip/engines/ldap/ConfigurableLDAPResolver.java +++ b/openaz-xacml/src/main/java/org/apache/openaz/xacml/std/pip/engines/ldap/ConfigurableLDAPResolver.java
@@ -167,12 +167,12 @@ private String evaluateVelocityTemplate(String template, final Map<String, PIPRequest> templateParameters, - final PIPEngine pipEngine, final PIPFinder pipFinder) + final PIPFinder pipFinder) throws PIPException { StringWriter out = new StringWriter(); VelocityContext vctx = new VelocityContext(); EventCartridge vec = new EventCartridge(); - VelocityParameterWriter writer = new VelocityParameterWriter(pipEngine, pipFinder, templateParameters); + VelocityParameterWriter writer = new VelocityParameterWriter(pipFinder, templateParameters); vec.addEventHandler(writer); vec.attachToContext(vctx); @@ -246,7 +246,7 @@ if (this.logger.isTraceEnabled()) { this.logger.trace("(" + id + ") " + pipRequest); } - return evaluateVelocityTemplate(this.base, this.baseParameters, pipEngine, pipFinder); + return evaluateVelocityTemplate(this.base, this.baseParameters, pipFinder); } public void setBase(String base) throws PIPException { @@ -274,7 +274,7 @@ return null; } - return evaluateVelocityTemplate(this.filter, this.filterParameters, pipEngine, pipFinder); + return evaluateVelocityTemplate(this.filter, this.filterParameters, pipFinder); } public void setFilterString(String filter) throws PIPException { @@ -407,12 +407,10 @@ private class VelocityParameterWriter extends VelocityParameterHandler { - private PIPEngine engine; private PIPFinder finder; private Map<String, PIPRequest> parameters; - public VelocityParameterWriter(PIPEngine engine, PIPFinder finder, Map<String, PIPRequest> parameters) { - this.engine = engine; + public VelocityParameterWriter(PIPFinder finder, Map<String, PIPRequest> parameters) { this.finder = finder; this.parameters = parameters; }