Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
3.0
-
None
-
None
-
linux, java 1.4.2
Description
Java throws a ClassCastException when an array return value is cast to a typed array, for XML-RPC functions that return arrays.
For example, the function
public Integer[] foo(Integer[] val)
{ return val; }will work fine with the following client code:
Integer[] param = new Integer[5];
Object[] result = (Object[])server.execute("Server.foo", param);
But the following will throw a class cast exception
Integer[] param = new Integer[5];
Integer[] result = (Integer[])server.execute("Server.foo", param);
This error was first documented on the mailing list in this thread:
http://mail-archives.apache.org/mod_mbox/ws-xmlrpc-dev/200609.mbox/%3c19c34bd10609220214g170174e2mdb9082f1aacb0537@mail.gmail.com%3e
The response to the email suggests that this should be easy to fix.