Skip to content

Commit c1028b0

Browse files
committed
fix xerces detection
1 parent a82aae3 commit c1028b0

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/changes/changes.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
</properties>
88

99
<body>
10+
<release version="2.69.0" date="xx, 2023" description="Bugfixes">
11+
<action type="fix" dev="rbri">
12+
Xerces detection was broken.
13+
</action>
14+
</release>
15+
1016
<release version="2.68.0" date="Dezember 28, 2022" description="Chrome/Edge 108, Firefox 108, Bugfixes, neko-html without xerces">
1117
<action type="fix" dev="rbri">
1218
cssparser: typo when skipping a rule containing em values.

src/main/java/com/gargoylesoftware/htmlunit/platform/Platform.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public final class Platform {
3939

4040
static {
4141
try {
42+
Class.forName("com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl");
4243
HelperSunXerces_ = (XmlUtilsHelperAPI)
4344
Class.forName("com.gargoylesoftware.htmlunit.platform.util.XmlUtilsSunXercesHelper").newInstance();
4445
}
@@ -47,6 +48,7 @@ public final class Platform {
4748
}
4849

4950
try {
51+
Class.forName("org.apache.xerces.dom.DeferredDocumentImpl");
5052
HelperXerces_ = (XmlUtilsHelperAPI)
5153
Class.forName("com.gargoylesoftware.htmlunit.platform.util.XmlUtilsXercesHelper").newInstance();
5254
}

src/main/java/com/gargoylesoftware/htmlunit/platform/util/XmlUtilsSunXercesHelper.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,14 @@
1919
import java.util.List;
2020
import java.util.Map;
2121

22-
import com.gargoylesoftware.htmlunit.platform.XmlUtilsHelperAPI;
23-
import com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl;
24-
import com.sun.org.apache.xerces.internal.dom.DeferredNode;
2522
import org.w3c.dom.Document;
2623
import org.w3c.dom.NamedNodeMap;
2724
import org.w3c.dom.Node;
2825

26+
import com.gargoylesoftware.htmlunit.platform.XmlUtilsHelperAPI;
27+
import com.sun.org.apache.xerces.internal.dom.DeferredDocumentImpl;
28+
import com.sun.org.apache.xerces.internal.dom.DeferredNode;
29+
2930
/**
3031
* <span style="color:red">INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.</span><br>
3132
*

0 commit comments

Comments
 (0)