RFR: 8049347: HTMLDocument throws NPE for Block Tag

Prasanta Sadhukhan psadhukhan at openjdk.org
Thu Jun 15 09:27:03 UTC 2023


On Thu, 15 Jun 2023 07:43:46 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> Does it do what the `getIterator` method promise to do? It doesn't because it iterates over `LeafElement`-s only:

As per the spec wordings,
`The [getIterator(HTML.Tag t)](https://docs.oracle.com/en/java/javase/20/docs/api/java.desktop/javax/swing/text/html/HTMLDocument.html#getIterator(javax.swing.text.html.HTML.Tag)) method can also be used for finding all occurrences of the specified HTML tag in the document.`

which I think is what we get with the fix an Iterator object with next block tag

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14466#discussion_r1230719224



More information about the client-libs-dev mailing list