RFR: 8328953 : JEditorPane.read throws ChangedCharSetException [v8]
Alexey Ivanov
aivanov at openjdk.org
Thu Mar 28 12:56:34 UTC 2024
On Thu, 28 Mar 2024 08:33:52 GMT, rjolly <duke at openjdk.org> wrote:
>> ChangedCharSetException is used to amend the charset during read according to html directives. Currently it causes immediate exit of the method which in turn causes failure to load html documents with charset directives (even if the latter must not change after all). This PR restores the catch operation as it was before the use of try with resources.
>
> rjolly has updated the pull request incrementally with one additional commit since the last revision:
>
> 8328953 : JEditorPane.read throws ChangedCharSetException
>
> The fix is to add a nested `try`-block inside `try-with-resource`; all the exceptions are handled in the nested `try`; the outer `try`-with-resouces only closes the input stream.
The tests are green now.
Thank you for your contribution.
-------------
Marked as reviewed by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/17567#pullrequestreview-1966131189
More information about the client-libs-dev
mailing list