ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1517477 - in /ace/trunk/org.apache.ace.agent: bnd.bnd src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java
Date Mon, 26 Aug 2013 09:28:20 GMT
Author: bramk
Date: Mon Aug 26 09:28:19 2013
New Revision: 1517477

URL: http://svn.apache.org/r1517477
Log:
ACE-347 Removed commons-codec dependency

Modified:
    ace/trunk/org.apache.ace.agent/bnd.bnd
    ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java
    ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java

Modified: ace/trunk/org.apache.ace.agent/bnd.bnd
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/bnd.bnd?rev=1517477&r1=1517476&r2=1517477&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/bnd.bnd (original)
+++ ace/trunk/org.apache.ace.agent/bnd.bnd Mon Aug 26 09:28:19 2013
@@ -8,11 +8,6 @@ Private-Package: org.apache.ace.range,\
 	org.apache.ace.log,\
 	org.apache.ace.agent.impl,\
 	org.apache.ace.agent.updater,\
-	org.apache.commons.codec,\
-	org.apache.commons.codec.binary,\
-	org.apache.commons.codec.digest,\
-	org.apache.commons.codec.language,\
-	org.apache.commons.codec.net,\
 	org.apache.felix.deploymentadmin,\
 	org.apache.felix.deploymentadmin.spi,\
 	org.osgi.service.event,\
@@ -37,7 +32,6 @@ Export-Package: org.apache.ace.agent,\
 	javax.servlet;version=2.5,\
 	org.apache.felix.deploymentadmin;version=0.9.4,\
 	org.easymock,\
-	commons-codec;version=1.4.0,\
 	org.apache.felix.http.jetty;version=2.2.1,\
 	org.apache.ace.range.api;version=latest,\
 	org.apache.ace.log.api;version=latest

Modified: ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java?rev=1517477&r1=1517476&r2=1517477&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java
(original)
+++ ace/trunk/org.apache.ace.agent/src/org/apache/ace/agent/impl/ConnectionHandlerImpl.java
Mon Aug 26 09:28:19 2013
@@ -34,9 +34,9 @@ import javax.net.ssl.KeyManagerFactory;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
+import javax.xml.bind.DatatypeConverter;
 
 import org.apache.ace.agent.ConnectionHandler;
-import org.apache.commons.codec.binary.Base64;
 
 /**
  * Default connection handler with support for BASIC authentication and HTTPS client certificates.
@@ -134,7 +134,7 @@ public class ConnectionHandlerImpl exten
             sb.append(new String((byte[]) values[1]));
         }
 
-        return "Basic " + new String(Base64.encodeBase64(sb.toString().getBytes()));
+        return "Basic " + DatatypeConverter.printBase64Binary(sb.toString().getBytes());
     }
 
     private void applyBasicAuthentication(URLConnection conn, Object[] values) {

Modified: ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java?rev=1517477&r1=1517476&r2=1517477&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java
(original)
+++ ace/trunk/org.apache.ace.agent/test/org/apache/ace/agent/impl/ConnectionHandlerImplTest.java
Mon Aug 26 09:28:19 2013
@@ -34,13 +34,13 @@ import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import javax.xml.bind.DatatypeConverter;
 
 import org.apache.ace.agent.AgentContext;
 import org.apache.ace.agent.ConfigurationHandler;
 import org.apache.ace.agent.ConnectionHandler;
 import org.apache.ace.agent.testutil.BaseAgentTest;
 import org.apache.ace.agent.testutil.TestWebServer;
-import org.apache.commons.codec.binary.Base64;
 import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
@@ -58,7 +58,7 @@ public class ConnectionHandlerImplTest e
         private final String m_authHeader;
 
         public BasicAuthServlet(String username, String password) {
-            m_authHeader = "Basic " + new String(Base64.encodeBase64((username + ":" + password).getBytes()));
+            m_authHeader = "Basic " + DatatypeConverter.printBase64Binary((username + ":"
+ password).getBytes());
         }
 
         @Override



Mime
View raw message