pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilman Hausherr (Jira)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4664) Iterator.remove() does not work in COSArrayList
Date Mon, 07 Oct 2019 18:45:00 GMT

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

Tilman Hausherr commented on PDFBOX-4664:

I really don't know... I don't like the class at all, it is kindof scary to manage two lists
inside, but I admit it is practical and I use it myself and I don't have a good idea. When
[~mkl] mentioned the problem I linked to I had a look into that class but then ran away scared.

> 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

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

View raw message