axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Brabant (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3212) UnsupportedOperationException due to usage of Arrays.asList
Date Wed, 19 Sep 2007 14:33:44 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12528775
] 

Vincent Brabant commented on AXIS2-3212:
----------------------------------------

By replacing the code of the method setRelationships() by the following code, problem is fixed:

public void setRelationships(RelatesTo[] list) {

if (list == null) return ;

int size = list.length;

ArrayList temp = new ArrayList(size);

for (int i = 0; i < size; i++) {

temp.add(list[i]);

}

relationships = temp;

}


> UnsupportedOperationException due to usage of Arrays.asList
> -----------------------------------------------------------
>
>                 Key: AXIS2-3212
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3212
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.3
>         Environment: Windows XP, JDK 1.5 and also JDK 1.6
>            Reporter: Vincent Brabant
>            Priority: Blocker
>
> When I am doing a basic JMS test (request/reply on JMS), I am always obtaining the following
error:
> Exception in thread "JMSWorker-1" java.lang.UnsupportedOperationException
> at java.util.AbstractList.add(AbstractList.java:151)
> at java.util.AbstractList.add(AbstractList.java:89)
> at org.apache.axis2.client.Options.addRelatesTo(Options.java:843)
> at org.apache.axis2.handlers.addressing.AddressingInHandler.extractRelatesToInformation(AddressingInHandler.java:249)
> at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation(AddressingInHandler.java:171)
> at org.apache.axis2.handlers.addressing.AddressingInHandler.invoke(AddressingInHandler.java:97)
> at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
> at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
> at org.apache.axis2.transport.jms.JMSMessageReceiver$Worker.run(JMSMessageReceiver.java:252)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
> at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
> at java.lang.Thread.run(Thread.java:595)
> The problem is caused because the org.apache.axis2.client.Options contains a method setRelationships(RelatesTo[]
list) {}
> that transform the array into a list by using the Arrays.asList()
> but the Arrays.asList() return you an unmodifiable list. So, impossible to add sotheting
nor to remove something ...

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message