fix xml tests for java 11
@@ -21,11 +21,8 @@ package org.apache.uima.util;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
-import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import junit.framework.TestCase;
-
import org.apache.uima.UIMAFramework;
import org.apache.uima.cas.CAS;
import org.apache.uima.cas.impl.XmiCasDeserializer;
@@ -39,6 +36,9 @@ import org.apache.uima.test.junit_extension.JUnitExtension;
import org.apache.uima.testTypeSystem_arrays.OfShorts;
import org.apache.uima.testTypeSystem_arrays.OfStrings;
import org.custommonkey.xmlunit.XMLAssert;
+import org.custommonkey.xmlunit.XMLUnit;
+
+import junit.framework.TestCase;
public class CasToInlineXmlTest extends TestCase {
@@ -149,7 +149,14 @@ public class CasToInlineXmlTest extends TestCase {
break;
}
}
+ boolean whitespaceFlag = XMLUnit.getIgnoreWhitespace();
+ XMLUnit.setIgnoreWhitespace(true);
+ try {
XMLAssert.assertXMLEqual(expected, result);
+ }
+ finally {
+ XMLUnit.setIgnoreWhitespace(whitespaceFlag);
+ }
// assertEquals(expected, result.trim());
}
