xmlunit/SOURCES/0004-Drop-support-for-JAXB.patch
2021-09-10 20:20:01 +00:00

61 lines
2.4 KiB
Diff

From 9866f331db726db0ac6af64649c308b01b34ea56 Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 5 Nov 2019 12:14:08 +0100
Subject: [PATCH 4/4] Drop support for JAXB
---
xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++--
.../src/test/java/org/xmlunit/builder/InputTest.java | 7 -------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
index 5321ff7..2b13cac 100644
--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
+++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
@@ -150,8 +150,8 @@ public class Input {
/**
* Build a Source from a Jaxb-Object.
*/
- public static JaxbBuilder fromJaxb(Object jaxbObject) {
- return new JaxbBuilder(jaxbObject);
+ public static Builder fromJaxb(Object jaxbObject) {
+ throw new RuntimeException("This implementation has JAXB support removed");
}
/**
diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
index 83ff38a..fac270d 100644
--- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
+++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java
@@ -31,7 +31,6 @@ import org.w3c.dom.Document;
import org.xmlunit.NullNode;
import org.xmlunit.TestResources;
import org.xmlunit.XMLUnitException;
-import org.xmlunit.builder.jaxb.ComplexNode;
import org.xmlunit.util.Convert;
import org.xmlunit.xpath.JAXPXPathEngine;
@@ -148,10 +147,6 @@ public class InputTest {
allIsWellFor(s, "furry");
}
- @Test public void shouldParseJaxbObject() throws Exception {
- allIsWellFor(Input.fromJaxb(new ComplexNode()).build(), "complexNode");
- }
-
@Test public void shouldParseUnknownToSource() throws Exception {
// from Source
allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build());
@@ -169,8 +164,6 @@ public class InputTest {
allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build());
// from URL
allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build());
- // from Jaxb-Object
- allIsWellFor(Input.from(new ComplexNode()).build(), "complexNode");
// from InputStream
FileInputStream is = null;
try {
--
2.21.0