Mario Jauvin created XALANJ-2616:
------------------------------------
Summary: Unable to supply a java.lang.String to argument expecting
java.lang.CharSequence
Key: XALANJ-2616
URL: https://issues.apache.org/jira/browse/XALANJ-2616
Project: XalanJ2
Issue Type: Bug
Security Level: No security risk; visible to anyone (Ordinary problems in
Xalan projects. Anybody can view the issue.)
Components: Xalan-extensions
Affects Versions: 2.7.2
Reporter: Mario Jauvin
Assignee: Steven J. Hathaway
If I use the sample XSL
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xalan/java">
<template match="/">
<variable name="collector"
select="java:java.util.stream.Collectors.joining(',')"/>
</template>
</stylesheet>{code}
with the following dummy XML
{code:java}
<?xml version="1.0" encoding="UTF-8"?>
<dummy/>{code}
I get the following error:
{noformat}
15:30:24,491 INFO [main] Main -
javax.xml.transform.TransformerFactory=org.apache.xalan.processor.TransformerFactoryImpl
15:30:24,493 INFO [main] Main -
java.endorsed.dirs=C:\radws\workspace\build-env\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\endorsed
15:30:24,500 INFO [main] Main - launchFile:
C:\radws\workspace\build-env\.metadata\.plugins\org.eclipse.wst.xsl.jaxp.launching\launch\launch.xml
15:30:24,922 INFO [main] JAXPSAXProcessorInvoker - Transforming...
file:/C:/radws/workspace/build-env/add-infra/samples/t2.xsl; Line #5; Column
#86; java.lang.IllegalArgumentException: argument type mismatch
file:/C:/radws/workspace/build-env/add-infra/samples/t2.xsl; Line #5; Column
#86; java.lang.NullPointerException
15:30:24,945 INFO [main] JAXPSAXProcessorInvoker - Done.{noformat}
This is because the convert method in MethodResolver does not accept
java.lang.CharSequence as a valid argument for the XObject.CLASS_STRING case.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]