logo       

Extension functions: array conversion bug: msg#00100

text.xml.saxon.help

Subject: Extension functions: array conversion bug

Mike,

Here is a small bug in the way arrays are converted when calling extension functions:

Error in call to extension function {public static java.lang.String[] nux.xom.xquery.XQueryUtil.foo(java.lang.String,java.lang.String [],boolean)}: Cannot convert supplied argument value to the required type

It works for sequences (i.e. arrays) of length > 1 or length == 0 but not for arrays of length == 1.
Here is a snipped to reproduce:

declare namespace util = "java:nux.xom.xquery.XQueryUtil";
util:foo(".", ("xx","yy"), true() ) (: works fine :)
util:foo(".", (), true() ) (: works fine :)
util:foo(".", ("xx"), true() ) (: bug :)


public static String[] foo(String baz, String[] args, boolean bar) {
return args;
}




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise