RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module
Phil Race
prr at openjdk.org
Mon Nov 18 20:40:30 UTC 2024
On Mon, 18 Nov 2024 07:19:52 GMT, Tejesh R <tr at openjdk.org> wrote:
>> Remove doPrivileged calls from javax.imageio, javax.print and some sound impl classes
>
> src/java.desktop/share/classes/javax/print/PrintServiceLookup.java line 349:
>
>> 347: ArrayList<PrintServiceLookup> los = getListOfLookupServices();
>> 348: while (iterator.hasNext()) {
>> 349: los.add(iterator.next());
>
> Any reason for removing the try-catch block which is handling `ServiceConfigurationError` exception?
Yes, SCE is supposed to propagate. not be caught. Only in the SM case do we catch it and swallow it.
Look at the deleted code - if there's no SM, it is rethrown. So with no SM the try catch is obsolete.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22186#discussion_r1847235332
More information about the client-libs-dev
mailing list