Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8269984: [macos] JTabbedPane title looks like disabled #4833

Closed
wants to merge 1 commit into from

Conversation

azuev-java
Copy link
Member

@azuev-java azuev-java commented Jul 20, 2021

Fixed the version string parsing to work correctly on macOS 11.x and beyond


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8269984: [macos] JTabbedPane title looks like disabled

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4833/head:pull/4833
$ git checkout pull/4833

Update a local copy of the PR:
$ git checkout pull/4833
$ git pull https://git.openjdk.java.net/jdk pull/4833/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4833

View PR using the GUI difftool:
$ git pr show -t 4833

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4833.diff

Fixed verion analysis so it works correctly with new naming scheme of
macOS 11.x and beyond
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 20, 2021

👋 Welcome back kizune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 20, 2021
@openjdk
Copy link

openjdk bot commented Jul 20, 2021

@azuev-java The following label will be automatically applied to this pull request:

  • awt

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the awt client-libs-dev@openjdk.org label Jul 20, 2021
@mlbridge
Copy link

mlbridge bot commented Jul 20, 2021

Webrevs

@mrserb
Copy link
Member

mrserb commented Jul 20, 2021

Is it the same bug as #4824 ?

@azuev-java
Copy link
Member Author

Is it the same bug as #4824 ?

Looks like it but in my case it is fixed correctly. His fix will not work on macOS 12 or above, mine will.

Copy link
Contributor

@prrace prrace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is this currently broken in JDK 17 .
Don't you need to fix it there and do a critical request ?
You need to bump it up to P2.
And of course you need to do a lot of testing :-)

@SuppressWarnings("removal")
String osVersion = AccessController.doPrivileged(new GetPropertyAction("os.version"));
String[] fragments = osVersion.split("\\.");

// sanity check the "10." part of the version
if (!fragments[0].equals("10")) return false;
if (fragments.length < 2) return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there always be 2 fragments now ? Does "12" get reported as "12.0" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will there always be 2 fragments now ? Does "12" get reported as "12.0" ?

As far as i know there always 3 - Apple always uses major.minor.patchLevel format - even when patch level is 0 they still include it. We only care about the first two though so as long as they are present we are Ok with it and even is Apple will move away from major.minor replacing it with just a major version there still will be a patch level so this code will still work.

@azuev-java
Copy link
Member Author

So is this currently broken in JDK 17 .
Don't you need to fix it there and do a critical request ?

I guess it is inevitable - as well as backporting it into the previous releases where original fix was integrated. Good thing is that this patch cleanly applies to jdk17 and i already tested it on BigSur with 17 and 16u so there will be less effort required.

@azuev-java
Copy link
Member Author

Closing this PR while opening one for jdk17.

@azuev-java azuev-java closed this Jul 22, 2021
@azuev-java azuev-java deleted the JDK-8269984 branch April 7, 2022 18:03
@openjdk openjdk bot added the client client-libs-dev@openjdk.org label Apr 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awt client-libs-dev@openjdk.org client client-libs-dev@openjdk.org rfr Pull request is ready for review
3 participants