RFR: 8349516: StAXStream2SAX.handleCharacters() fails on empty CDATA [v2]

Naoto Sato naoto at openjdk.org
Mon Mar 3 18:05:55 UTC 2025


On Sat, 1 Mar 2025 01:19:17 GMT, Joe Wang <joehw at openjdk.org> wrote:

>> Fix handleCharacters by adding a guard to zero length and letting the rest of the process continue (e.g. closing tags and etc).
>
> Joe Wang has updated the pull request incrementally with one additional commit since the last revision:
> 
>   remove commented section

test/jaxp/javax/xml/jaxp/unittest/validation/ValidationTest.java line 151:

> 149:      *
> 150:      * @throws Exception if the test fails, in which case the parser throws
> 151:      * IndexOutOfBoundsException.

Do we need this `throws Exception` clause (and the method declaration below)? Since AIOOBE is a `RuntimeException`, this `throws` clause does not seem to be necessary. Simple description of the failure case may suffice.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23847#discussion_r1977948293


More information about the core-libs-dev mailing list