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
JDK-8278549: UNIX sun/font coding misses SUSE distro detection on recent distro SUSE 15 #6956
Conversation
|
Webrevs
|
@@ -295,6 +295,12 @@ private String getVersionString(File f) { | |||
return null; | |||
} | |||
|
|||
private String getOsinfo(String s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe call it extractOsInfo
?
props.load(fis); | ||
} | ||
osName = props.getProperty("NAME"); | ||
osVersion = props.getProperty("VERSION_ID"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra whitespace.
Hi Martin, thanks for your suggestions. I renamed the function and removed the whitespace. |
I adjusted MFontConfiguration.java as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing it. I don't know if "JDK-" prefix is allowed in the bug title. Otherwise, looks good.,
@MBaesken This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 113 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me.
Thanks for making the OS detection "future-proof".
/integrate |
Going to push as commit 84976b4.
Your commit was automatically rebased without conflicts. |
Hello, please review this adjustment for recent SUSE Linux 15.
The font coding on UNIX, see setOsNameAndVersion in files
src/java.desktop/unix/classes/sun/font/FcFontConfiguration.java
src/java.desktop/unix/classes/sun/font/MFontConfiguration.java
uses the file /etc/SuSE-release to detect SUSE Linux. However on SUSE Linux 15 this file does not exist any more.
Instead /etc/os-release can be used as a replacement on SLES12 and SLES15 :
Example content of /etc/os-release
NAME="SLES"
VERSION="12-SP2"
VERSION_ID="12.2"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP2"
There the name and version information is stored (NAME=... , VERSION_ID=...).
Additionally I noticed that there is some code duplication in FcFontConfiguration.java and MFontConfiguration.java , what do you think about moving this to some common place ?
Thanks, Matthias
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6956/head:pull/6956
$ git checkout pull/6956
Update a local copy of the PR:
$ git checkout pull/6956
$ git pull https://git.openjdk.java.net/jdk pull/6956/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6956
View PR using the GUI difftool:
$ git pr show -t 6956
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6956.diff