You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openaz.apache.org by co...@apache.org on 2015/07/16 11:22:25 UTC

incubator-openaz git commit: Removing some deprecated types/warnings

Repository: incubator-openaz
Updated Branches:
  refs/heads/master 01ef51b29 -> 415b974a0


Removing some deprecated types/warnings


Project: http://git-wip-us.apache.org/repos/asf/incubator-openaz/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-openaz/commit/415b974a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-openaz/tree/415b974a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-openaz/diff/415b974a

Branch: refs/heads/master
Commit: 415b974a0ae58d73f8a31c4193bdd1c78618360d
Parents: 01ef51b
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Thu Jul 16 10:22:09 2015 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Thu Jul 16 10:22:09 2015 +0100

----------------------------------------------------------------------
 .../FunctionDefinitionURIStringConcatenateTest.java     |  2 +-
 .../java/org/apache/openaz/xacml/pdp/test/TestBase.java |  5 ++---
 .../apache/openaz/xacml/pdp/test/custom/TestCustom.java |  5 ++---
 .../apache/openaz/xacml/pdp/test/policy/TestPolicy.java |  5 ++---
 .../std/pip/engines/ldap/ConfigurableLDAPResolver.java  | 12 +++++-------
 5 files changed, 12 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/415b974a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/std/functions/FunctionDefinitionURIStringConcatenateTest.java
----------------------------------------------------------------------
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 @@ import org.junit.Test;
  * 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 @@ public class FunctionDefinitionURIStringConcatenateTest {
      */
     List<FunctionArgument> arguments = new ArrayList<FunctionArgument>();
 
-    @SuppressWarnings("deprecation")
     @Test
     public void testURI_string_concatenate() {
 

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/415b974a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/TestBase.java
----------------------------------------------------------------------
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.Matcher;
 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 @@ public class TestBase extends SimpleFileVisitor<Path> {
         //
         // 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
         //

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/415b974a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/custom/TestCustom.java
----------------------------------------------------------------------
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.IllegalBlockSizeException;
 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 @@ public class TestCustom extends TestBase {
         //
         // 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.

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/415b974a/openaz-xacml-test/src/test/java/org/apache/openaz/xacml/pdp/test/policy/TestPolicy.java
----------------------------------------------------------------------
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.PolicyType;
 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 @@ public class TestPolicy extends TestBase {
         //
         // 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));
             //

http://git-wip-us.apache.org/repos/asf/incubator-openaz/blob/415b974a/openaz-xacml/src/main/java/org/apache/openaz/xacml/std/pip/engines/ldap/ConfigurableLDAPResolver.java
----------------------------------------------------------------------
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 @@ public class ConfigurableLDAPResolver implements LDAPResolver {
 
     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 @@ public class ConfigurableLDAPResolver implements LDAPResolver {
         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 @@ public class ConfigurableLDAPResolver implements LDAPResolver {
             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 @@ public class ConfigurableLDAPResolver implements LDAPResolver {
 
     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;
         }