RFR: 8328953 : JEditorPane.read throws ChangedCharSetException
Alexey Ivanov
aivanov at openjdk.org
Tue Mar 26 12:07:29 UTC 2024
On Tue, 26 Mar 2024 11:40:50 GMT, Tejesh R <tr 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.
>
> test/jdk/javax/swing/JEditorPane/8328953/EditorPaneCharset.java line 46:
>
>> 44: "<html lang=\"ru\">\n" +
>> 45: "<head>\n" +
>> 46: " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1251\">\n" +
>
> Line exceeds column length which we usually restrict to 80...
It fits into 100-column limit, so not strictly necessary… Could be broken though to fit into 80-column limit.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17567#discussion_r1539093429
More information about the client-libs-dev
mailing list