RFR: 8344064: Remove doPrivileged calls from print/imageio/media classes in the java.desktop module [v2]
Phil Race
prr at openjdk.org
Wed Nov 20 18:48:21 UTC 2024
On Wed, 20 Nov 2024 04:44:29 GMT, Tejesh R <tr at openjdk.org> wrote:
>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8344064
>
> src/java.desktop/share/classes/javax/print/StreamPrintServiceFactory.java line 200:
>
>> 198: ArrayList<StreamPrintServiceFactory> lof = getListOfFactories();
>> 199: while (iterator.hasNext()) {
>> 200: lof.add(iterator.next());
>
> `lof` is set with data here but never used. Was it used only to check for `ServiceConfigurationError` exception? or am I missing something?
yes, you are missing something.
"lof" is obtained from the call to getListOfFactories()
It is a reference to the ArrayList holding the factories.
Thus "lof.add(..)" is updating that persistent list.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22186#discussion_r1850817549
More information about the client-libs-dev
mailing list