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

Phil Race prr at openjdk.org
Thu Oct 31 19:54:37 UTC 2024


On Thu, 31 Oct 2024 19:44:22 GMT, Anirvan Sarkar <asarkar at openjdk.org> wrote:

>> modules/javafx.graphics/src/main/java/javafx/application/Preloader.java line 107:
>> 
>>> 105: 
>>> 106:     // Too bad this isn't already available in a Java core class
>>> 107:     private static final String lineSeparator;
>> 
>> Suggestion:
>> 
>>     private static final String lineSeparator = System.getProperty("line.separator", "\n");
>
> I would suggest to remove the variable `lineSeparator` and simply use `System.lineSeparator()`.

I agree. That has been available since 1.7. But possibly this code is old enough to pre-date that ..

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

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


More information about the openjfx-dev mailing list