[jboss-jira] [JBoss JIRA] Updated: (JBXB-79) Array parameter is being appended rather than passed intact
Alexey Loubyansky (JIRA)
jira-events at jboss.com
Mon Sep 25 12:06:01 EDT 2006
[ http://jira.jboss.com/jira/browse/JBXB-79?page=all ]
Alexey Loubyansky updated JBXB-79:
----------------------------------
Fix Version/s: JBossXB-1.0.0.CR7
Affects Version/s: JBossXB-1.0.0.CR6
> Array parameter is being appended rather than passed intact
> -----------------------------------------------------------
>
> Key: JBXB-79
> URL: http://jira.jboss.com/jira/browse/JBXB-79
> Project: JBoss XML Binding (JBossXB)
> Issue Type: Bug
> Affects Versions: JBossXB-1.0.0.CR6
> Reporter: David Boeren
> Assigned To: Alexey Loubyansky
> Fix For: JBossXB-1.0.0.CR7
>
> Attachments: coils.ZIP
>
>
> When I call a webservice method and pass an object containing an array of another object type, the server receives the array with additional elements. The array elements that I pass are appended, so that if I send 1 element the server receives 81. If I send 80 elements, the server receives 160. There are always 80 element preceding the first one that I pass.
> The value 80 comes from code in the object constructor that preinitializes the array to this size.
> This form causes the bug:
> public class Coils implements Serializable{
> private int numberOfCoils;
> private CoilData[] array = new CoilData[80];
> }
> This form likewise causes the bug:
> public class Coils implements Serializable{
> private int numberOfCoils;
> private CoilData[] array;
> public Coils() {
> array = new CoilData[80];
> }
> }
> This form does not cause the bug:
> public class Coils implements Serializable{
> private int numberOfCoils;
> private CoilData[] array;
> public Coils() {
> }
> }
> Coils coils = new Coils();
> coils.setArray(new CoilData[80]);
> So, it has something to do with initializing it in the construction of the object.
> Attached is a full Eclipse project exhibiting the bug that you can run on JBoss 4.0.4.GA with JBossWS.
> To keep the attachment size down, I left off the library files. You will need:
> activation.jar, jbossall-client.jar, jbossws-client.jar, mail.jar, xercesImpl.jar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list