You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2015/05/02 09:54:28 UTC
svn commit: r1677285 - in /webservices/axiom/trunk: ./ modules/axiom-api/
modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/
testing/axiom-testsuite/
testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/
testing/axiom-testsuit...
Author: veithen
Date: Sat May 2 07:54:28 2015
New Revision: 1677285
URL: http://svn.apache.org/r1677285
Log:
In unit tests, use the base64 codec from commons-codec.
Modified:
webservices/axiom/trunk/modules/axiom-api/pom.xml
webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java
webservices/axiom/trunk/pom.xml
webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestGetTextCharactersFromDataHandler.java
webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/text/TestGetNodeValueBinary.java
Modified: webservices/axiom/trunk/modules/axiom-api/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/pom.xml?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/pom.xml (original)
+++ webservices/axiom/trunk/modules/axiom-api/pom.xml Sat May 2 07:54:28 2015
@@ -110,6 +110,11 @@
<artifactId>geronimo-javamail_1.4_spec</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Modified: webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java (original)
+++ webservices/axiom/trunk/modules/axiom-api/src/test/java/org/apache/axiom/util/stax/xop/XOPDecodingStreamReaderTest.java Sat May 2 07:54:28 2015
@@ -30,7 +30,7 @@ import org.apache.axiom.om.TestConstants
import org.apache.axiom.om.impl.builder.OMAttachmentAccessorMimePartProvider;
import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.testutils.stax.XMLStreamReaderComparator;
-import org.apache.axiom.util.base64.Base64Utils;
+import org.apache.commons.codec.binary.Base64;
public class XOPDecodingStreamReaderTest extends AbstractTestCase {
private XMLStreamReader getXOPDecodingStreamReader() throws Exception {
@@ -58,7 +58,7 @@ public class XOPDecodingStreamReaderTest
reader.next();
}
String base64 = reader.getElementText();
- byte[] data = Base64Utils.decode(base64);
+ byte[] data = Base64.decodeBase64(base64);
// The data is actually a JPEG image. Try to decode it to check that the data is not
// corrupted.
ImageIO.read(new ByteArrayInputStream(data));
Modified: webservices/axiom/trunk/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/pom.xml?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/pom.xml (original)
+++ webservices/axiom/trunk/pom.xml Sat May 2 07:54:28 2015
@@ -445,6 +445,11 @@
<artifactId>saaj-impl</artifactId>
<version>1.3.10</version>
</dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.10</version>
+ </dependency>
</dependencies>
</dependencyManagement>
Modified: webservices/axiom/trunk/testing/axiom-testsuite/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/pom.xml?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/pom.xml (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/pom.xml Sat May 2 07:54:28 2015
@@ -81,6 +81,10 @@
<artifactId>soap-testsuite</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
</dependencies>
<profiles>
Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestGetTextCharactersFromDataHandler.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestGetTextCharactersFromDataHandler.java?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestGetTextCharactersFromDataHandler.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/om/text/TestGetTextCharactersFromDataHandler.java Sat May 2 07:54:28 2015
@@ -23,7 +23,7 @@ import javax.activation.DataHandler;
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMText;
import org.apache.axiom.ts.AxiomTestCase;
-import org.apache.axiom.util.base64.Base64Utils;
+import org.apache.commons.codec.binary.Base64;
/**
* Tests that {@link OMText#getTextCharacters()} returns the expected result for an {@link OMText}
@@ -39,7 +39,7 @@ public class TestGetTextCharactersFromDa
DataHandler dh = new DataHandler("test content", "text/plain; charset=utf-8");
OMText text = metaFactory.getOMFactory().createOMText(dh, true);
char[] chars = text.getTextCharacters();
- byte[] decoded = Base64Utils.decode(chars, 0, chars.length);
+ byte[] decoded = Base64.decodeBase64(new String(chars));
assertEquals("test content", new String(decoded, "utf-8"));
}
}
Modified: webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/text/TestGetNodeValueBinary.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/text/TestGetNodeValueBinary.java?rev=1677285&r1=1677284&r2=1677285&view=diff
==============================================================================
--- webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/text/TestGetNodeValueBinary.java (original)
+++ webservices/axiom/trunk/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/omdom/text/TestGetNodeValueBinary.java Sat May 2 07:54:28 2015
@@ -32,7 +32,7 @@ import org.apache.axiom.om.OMMetaFactory
import org.apache.axiom.testutils.activation.RandomDataSource;
import org.apache.axiom.testutils.io.IOTestUtils;
import org.apache.axiom.ts.AxiomTestCase;
-import org.apache.axiom.util.base64.Base64Utils;
+import org.apache.commons.codec.binary.Base64;
import org.w3c.dom.Text;
public class TestGetNodeValueBinary extends AxiomTestCase {
@@ -47,6 +47,6 @@ public class TestGetNodeValueBinary exte
String nodeValue = text.getNodeValue();
assertThat(nodeValue, is(notNullValue()));
IOTestUtils.compareStreams(ds.getInputStream(),
- new ByteArrayInputStream(Base64Utils.decode(nodeValue)));
+ new ByteArrayInputStream(Base64.decodeBase64(nodeValue)));
}
}