RFR: 8342456: Remove calls to doPrivileged in javafx.graphics/other [v2]

Kevin Rushforth kcr at openjdk.org
Thu Oct 31 18:34:39 UTC 2024


On Thu, 31 Oct 2024 16:25:39 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> Lukasz Kostyra has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Scene: Remove missed doPrivileged use
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/font/PrismFontFile.java line 137:
> 
>> 135:                 isCopy = isDecoded = false;
>> 136:             } catch (Exception e) {
>> 137:             } finally {
> 
> even though the code change is equivalent, it will print "temp file not deleted" followed by "temp file deleted".

Since this is preexisting, do you think it is worth a follow-up issue? Worth noting is that the prints only happen when a debug system property is set.

I have a separate question: Is the `finally` statement really needed? Given that `Exception` is caught and ignored, the only thing that adding `finally` will do is run the code if there is an `Error` thrown. That doesn't seem necessary, and also isn't equivalent to the previous code.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1619#discussion_r1824902556


More information about the openjfx-dev mailing list