xmlunit/0003-Drop-support-for-JAXB.patch
Mikolaj Izdebski 76351b098b Initial import from Fedora
Resolves: rhbz#2083112
2022-08-10 07:35:08 +02:00

61 lines
2.6 KiB
Diff

From 4b30dd33332f79c71697c8a9bdbf39d74fb06c4a Mon Sep 17 00:00:00 2001
From: Mikolaj Izdebski <mizdebsk@redhat.com>
Date: Tue, 5 Nov 2019 12:14:08 +0100
Subject: [PATCH 3/3] 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 27d9c5a..81165cc 100644
--- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
+++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java
@@ -153,8 +153,8 @@ public static Builder from(Object object) {
/**
* 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 e767f38..98e3fe7 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.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;
@@ -132,10 +131,6 @@ private static Document parse(Source s) throws Exception {
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());
@@ -153,8 +148,6 @@ private static Document parse(Source s) throws Exception {
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
try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) {
allIsWellFor(Input.from(is).build());
--
2.35.1