[ 
https://issues.apache.org/jira/browse/IVY-1589?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16580735#comment-16580735
 ] 

Simon Wade edited comment on IVY-1589 at 8/15/18 5:27 AM:
----------------------------------------------------------

As far as I can tell, the root cause seems to be line 174 of FileUtil.java:
{code:java}
existingChild = Arrays.asList(children);
{code}
The value returned by asList() does not support the remove() operation, which 
is the cause of the exception at line 188 (as seen in the stack trace). A bit 
of Google-Fu suggests the following fix:
{code:java}
existingChild = new ArrayList(Arrays.asList(children));
{code}


was (Author: simon wade):
As far as I can tell, the root cause seems to be line 174 of FileUtil.java:
{code:java}
existingChild = Arrays.asList(children);
{code}
The value returned by asList() does not support the remove() operation, which 
is the cause of the exception at line 190 (as seen in the stack trace). A bit 
of Google-Fu suggests the following fix:
{code:java}
existingChild = new ArrayList(Arrays.asList(children));
{code}

> UnsupportedOperationException on consecutive retrieves
> ------------------------------------------------------
>
>                 Key: IVY-1589
>                 URL: https://issues.apache.org/jira/browse/IVY-1589
>             Project: Ivy
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.5.0-rc1
>            Reporter: Simon Wade
>            Priority: Major
>
> Following a successful retrieve with overwriteMode set to "always", 
> subsequent retrieve tasks seem to throw an UnsupportedOperationException, as 
> shown in the following stack trace:
> {noformat}
> Caused by: java.lang.UnsupportedOperationException
>         at java.util.AbstractList.remove(AbstractList.java:161)
>         at java.util.AbstractList$Itr.remove(AbstractList.java:374)
>         at java.util.AbstractCollection.remove(AbstractCollection.java:293)
>         at org.apache.ivy.util.FileUtil.deepCopy(FileUtil.java:188)
>         at org.apache.ivy.util.FileUtil.copy(FileUtil.java:143)
>         at 
> org.apache.ivy.core.retrieve.RetrieveEngine.retrieve(RetrieveEngine.java:171)
>         ... 19 more
> {noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to