RFR: 8140527: JInternalFrame has incorrect title button width [v5]

Alexey Ivanov aivanov at openjdk.org
Mon Jun 26 21:32:05 UTC 2023


On Mon, 26 Jun 2023 21:21:01 GMT, Harshitha Onkar <honkar at openjdk.org> wrote:

>> test/jdk/javax/swing/JInternalFrame/InternalFrameTitleButtonTest.java line 53:
>> 
>>> 51:     public static void main(String[] args) throws Exception {
>>> 52:         String osName = System.getProperty("os.name");
>>> 53:         if(!osName.toLowerCase().contains("win")) {
>> 
>> Suggestion:
>> 
>>         if (!osName.toLowerCase().contains("win")) {
>
> @prsadhuk The string compare can be replaced with `OSInfo.getOSType() == OSInfo.OSType.WINDOWS`  and in case you want to retain the OSCheck along with `@requires (os.family == "windows")` when run as standalone test.

I think [it's redundant](https://github.com/openjdk/jdk/pull/14555#discussion_r1242206200) in this case because setting Windows Classic L&F will throw an exception on other platforms.

It was [`OSInfo`-check initially](https://github.com/openjdk/jdk/pull/14555#discussion_r1240155464).

I'm fine with either way. However, I prefer *no check* in this particular case.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14555#discussion_r1242789336



More information about the client-libs-dev mailing list