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

Maruan Sahyoun commented on PDFBOX-4664:
----------------------------------------

Another thought. For trunk we could also do a much cleaner approach where 
COSArray is based on Array and COSArrayList is based on List. This way the 
classes better reflect the Java standard classes and as a result might be more 
inline with the users expectation. So for 2.0 I'd only fix COSArrayList and for 
trunk rearrange COSArray and COSArrayList e.g. move all methods which are 
similar to List from COSArray to COSArrayList. We should also consider moving 
COSArrayList into o.a.p.cos.  

WDYT?


> Iterator.remove() does not work in COSArrayList
> -----------------------------------------------
>
>                 Key: PDFBOX-4664
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4664
>             Project: PDFBox
>          Issue Type: Bug
>    Affects Versions: 2.0.17
>            Reporter: Zhichao Yang
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>
> {code:java}
> for (Iterator itr = pdfPage.getAnnotations().iterator(); itr.hasNext(); ) {
>                     itr.remove();
>  }
> {code}
> This is not working on annotations list because cosArrayList.iterator() is 
> cosArrayList.actual.iterator(), but when convert to a COSArray it uses 
> cosArrayList.array, which is not affected by iterator.remove(). A iterator to 
> sync the actual and the array would be nice.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to