[OpenJDK 2D-Dev] RFR(XS): 8132408 : Check os.name before os.version in SunGraphicsEnvironment constructor

Phil Race philip.race at oracle.com
Tue Jul 28 17:12:14 UTC 2015

The idea behind the check dates from when there was a big push
behing OpenSolaris and 'uname -n' would not necessarily return "SunOS"
but the version numbers shhuld match for an opensolaris built from the 
same sources.

So restricting the check to when the os.name is SunOS basically
breaks the whole point.

But OpenSolaris is no more (isn't it?)
Probably the thing to do is also whack the parsing of /etc/release and just
keep the check for whether the Courier New font is there.
Or maybe for > 5.10 we should just always use fontconfig like we do on
Linux nowadays ?


On 07/28/2015 09:00 AM, Volker Simonis wrote:
> Hi,
> could you please review the following small change:
> http://cr.openjdk.java.net/~simonis/webrevs/2015/8132408/
> https://bugs.openjdk.java.net/browse/JDK-8132408
> In the constructor of SunGraphicsEnvironment there's a check for
> os.version > 5.10.
> If this check is true, /etc/release is opened to get additional
> Solaris-specific information. But this query only makes sense on
> Solaris, so we should first check if we're really running on Solaris
> before we check for os.version being bigger than 5.10.
> Otherwise, the VM will try to open /etc/release on every system which
> has an os.version bigger than 5.10 (e.g. AIX 7.1 or Linux once we get
> to kernel version 5.11 :).
> Thanks,
> Volker

More information about the 2d-dev mailing list