Skip to content

Commit ad769e9

Browse files
author
Eugene Bochilo
committed
Rework XmlUtilTest to avoid relying on internal JDK classes
DEVSIX-6628
1 parent fd79d9f commit ad769e9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

io/src/test/java/com/itextpdf/io/util/XmlUtilTest.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ This file is part of the iText (R) project.
4444

4545
import com.itextpdf.test.ExtendedITextTest;
4646
import com.itextpdf.test.annotations.type.UnitTest;
47-
import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
48-
import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
4947
import org.junit.Assert;
5048
import org.junit.Test;
5149
import org.junit.experimental.categories.Category;
@@ -67,13 +65,13 @@ public void initNewXmlDocumentTest() throws Exception {
6765
public void getDocumentBuilderFactoryTest() {
6866
DocumentBuilderFactory factory = XmlUtil.getDocumentBuilderFactory();
6967

70-
Assert.assertEquals(DocumentBuilderFactoryImpl.class, factory.getClass());
68+
Assert.assertEquals(DocumentBuilderFactory.newInstance().getClass(), factory.getClass());
7169
}
7270

7371
@Test
7472
public void createSAXParserFactoryTest() {
7573
SAXParserFactory factory = XmlUtil.createSAXParserFactory();
7674

77-
Assert.assertEquals(SAXParserFactoryImpl.class, factory.getClass());
75+
Assert.assertEquals(SAXParserFactory.newInstance().getClass(), factory.getClass());
7876
}
7977
}

0 commit comments

Comments
 (0)