-
Bug
-
Resolution: Done
-
Major
-
8.0.0.Beta
-
None
-
False
-
None
-
False
-
-
-
-
-
-
Known Issue
-
-
Platform TCK jstl module validation that XPath variables of Java types can be properly used in XPath expressions fails.
Test positiveXPathToJavaTypesTest at https://github.com/jakartaee/platform-tck/blob/10.0.0.Final/src/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClient.java#L67 fails:
Caused by: java.lang.ClassCastException: class java.lang.Boolean cannot be cast to class org.w3c.dom.Node (java.lang.Boolean is in module java.base of loader 'bootstrap'; org.w3c.dom.Node is in module java.xml of loader 'bootstrap') at jakarta.servlet.jstl.api@3.0.0.redhat-00001//org.apache.taglibs.standard.tag.common.xml.JSTLNodeList.<init>(XPathUtil.java:321) at jakarta.servlet.jstl.api@3.0.0.redhat-00001//org.apache.taglibs.standard.tag.common.xml.XPathUtil.selectNodes(XPathUtil.java:223) at jakarta.servlet.jstl.api@3.0.0.redhat-00001//org.apache.taglibs.standard.tag.common.xml.SetTag.doStartTag(SetTag.java:71) at org.apache.jsp.positiveXPathToJavaTypesTest_jsp._jspx_meth_x_005fset_005f0(positiveXPathToJavaTypesTest_jsp.java:278) at org.apache.jsp.positiveXPathToJavaTypesTest_jsp._jspx_meth_tck_005ftest_005f0(positiveXPathToJavaTypesTest_jsp.java:165) at org.apache.jsp.positiveXPathToJavaTypesTest_jsp._jspService(positiveXPathToJavaTypesTest_jsp.java:114) at io.undertow.jsp@2.2.3.Final-redhat-00001//org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at jakarta.servlet.api@6.0.0.redhat-00001//jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614) at io.undertow.jsp@2.2.3.Final-redhat-00001//org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:422)
The upstream code in the XPathUtil file has no cast at L321:
But a decompiled 3.0.0.redhat-00001 shows an added cast to Node:
nodeVector.addElement((Node) o );
This commit seems to be missing:
https://github.com/eclipse-ee4j/jstl-api/commit/3b3a8c85b1ee417ee71fb1f99054eaf6cca2f39e
That was the fix for: