On Tue, 5 Mar 2024 18:00:51 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:

>> Christoph Langer has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   load awt.dll before display check
>
> src/java.desktop/windows/classes/sun/awt/PlatformGraphicsInfo.java line 35:
> 
>> 33: public class PlatformGraphicsInfo {
>> 34: 
>> 35:     private static boolean hasDisplays;
> 
> I believe it can be declared `final`, it's initialised in the static 
> initialiser that follows the declaration.
> Suggestion:
> 
>     private static final boolean hasDisplays;

Good catch. I updated it.

> src/java.desktop/windows/classes/sun/awt/PlatformGraphicsInfo.java line 38:
> 
>> 36: 
>> 37:     static {
>> 38:         loadAWTLibrary();
> 
> Can `WToolkit.loadLibraries()` be used here? The method is declared public, 
> so it should be accessible.
> 
> It may create a circular dependency though.

Maybe. I think, as Phil already mentions, a cleanup/centralization of the 
places that load libawt should be done. But I would suggest to do this in a 
separate issue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1513974122
PR Review Comment: https://git.openjdk.org/jdk/pull/17614#discussion_r1513973885

Reply via email to