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

Volker Simonis volker.simonis at gmail.com
Tue Jul 28 18:43:56 UTC 2015

Hi Phil,

thanks for looking at this change.
Please find my comments inline:

On Tue, Jul 28, 2015 at 7:12 PM, Phil Race <philip.race at oracle.com> wrote:
> 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.

I had the same fear initially, but then I found this:


entry where the Illumos people started a discussion about changing the
output from 'unmae -s' to something different than "SunOS" in the
future. But it seems they've still not changed that, so maybe this fix
is 'good enough' for now?

What else would you suggest otherwise?

We have people who run Java in some highly secure environments and
they are complaining about the VM trying to open this non-existing

> 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 ?

I'm by no means an OpenSolaris expert (and I don't have a machine to
check) but I will be happy to add whatever additional change you


> -phil.
> 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