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 2023/06/07 23:48:43 UTC
[ws-axiom] branch master updated: AXIOM-506: Remove unnecessary usages of PartDataHandlerBlobFactory
This is an automated email from the ASF dual-hosted git repository.
veithen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ws-axiom.git
The following commit(s) were added to refs/heads/master by this push:
new 5d9357232 AXIOM-506: Remove unnecessary usages of PartDataHandlerBlobFactory
5d9357232 is described below
commit 5d935723283a0295aed4df9631ec57bf0dee7ec5
Author: Andreas Veithen <an...@gmail.com>
AuthorDate: Wed Jun 7 23:31:03 2023 +0000
AXIOM-506: Remove unnecessary usages of PartDataHandlerBlobFactory
---
.../ts/soap12/envelope/TestBuildWithAttachments.java | 2 --
.../ts/soap12/envelope/TestMTOMForwardStreaming.java | 15 +++------------
2 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
index 52c96b742..599ffcf94 100644
--- a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
+++ b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestBuildWithAttachments.java
@@ -22,7 +22,6 @@ import java.io.InputStream;
import java.util.Iterator;
import org.apache.axiom.mime.MultipartBody;
-import org.apache.axiom.mime.activation.PartDataHandlerBlobFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMText;
@@ -45,7 +44,6 @@ public class TestBuildWithAttachments extends AxiomTestCase {
MultipartBody.builder()
.setInputStream(in)
.setContentType(sample.getContentType())
- .setPartBlobFactory(PartDataHandlerBlobFactory.DEFAULT)
.build();
SOAPEnvelope envelope =
OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, mb).getSOAPEnvelope();
diff --git a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
index ac750896b..a8033f324 100644
--- a/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
+++ b/testing/axiom-testsuite/src/main/java/org/apache/axiom/ts/soap12/envelope/TestMTOMForwardStreaming.java
@@ -24,8 +24,7 @@ import java.util.Iterator;
import org.apache.axiom.blob.Blob;
import org.apache.axiom.mime.MultipartBody;
-import org.apache.axiom.mime.activation.PartDataHandlerBlobFactory;
-import org.apache.axiom.mime.activation.PartDataHandler;
+import org.apache.axiom.mime.PartBlob;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMOutputFormat;
@@ -37,7 +36,6 @@ import org.apache.axiom.soap.SOAPFactory;
import org.apache.axiom.testutils.blob.TestBlob;
import org.apache.axiom.testutils.io.IOTestUtils;
import org.apache.axiom.ts.AxiomTestCase;
-import org.apache.axiom.util.activation.DataHandlerUtils;
/**
* Tests that attachments are streamed (i.e. not read entirely into memory) if the original message
@@ -108,8 +106,6 @@ public class TestMTOMForwardStreaming extends AxiomTestCase {
MultipartBody.builder()
.setInputStream(pipe1In)
.setContentType(contentType)
- .setPartBlobFactory(
- PartDataHandlerBlobFactory.DEFAULT)
.build();
SOAPEnvelope envelope =
OMXMLBuilderFactory.createSOAPModelBuilder(
@@ -138,7 +134,6 @@ public class TestMTOMForwardStreaming extends AxiomTestCase {
MultipartBody.builder()
.setInputStream(pipe2In)
.setContentType(contentType)
- .setPartBlobFactory(PartDataHandlerBlobFactory.DEFAULT)
.build();
SOAPEnvelope envelope =
OMXMLBuilderFactory.createSOAPModelBuilder(metaFactory, mb).getSOAPEnvelope();
@@ -149,16 +144,12 @@ public class TestMTOMForwardStreaming extends AxiomTestCase {
IOTestUtils.compareStreams(
blob1.getInputStream(),
- ((PartDataHandler)
- DataHandlerUtils.toDataHandler(
- ((OMText) data1.getFirstOMChild()).getBlob()))
+ ((PartBlob) ((OMText) data1.getFirstOMChild()).getBlob())
.getPart()
.getInputStream(false));
IOTestUtils.compareStreams(
blob2.getInputStream(),
- ((PartDataHandler)
- DataHandlerUtils.toDataHandler(
- ((OMText) data2.getFirstOMChild()).getBlob()))
+ ((PartBlob) ((OMText) data2.getFirstOMChild()).getBlob())
.getPart()
.getInputStream(false));
} finally {