[modules-dev] Review request: 6617767 (add os.platform system property)

Dave Bristor David.Bristor at Sun.COM
Fri Jan 18 16:08:37 PST 2008


Stanley and I chatted about this change, and I've made a couple of updates:

* If the current platform is not recognized, os.platform has the same value as 
os.name.

* lib/security/java.policy is updated to allow unfettered read access to 
os.platform.

The test was updated for unrecognized platforms, but not for the security 
change.  Tips/pointers on how to test that are a little outside my knowledge, 
and are hence welcome...

Webrev updated,
	Dave

Dave Bristor wrote:
> This adds a new system property, os.platform, to System properties.
> 
> webrev: http://analemma.sfbay.sun.com/java/jdk/ws/libs/rev/6617767/
> bugster: http://monaco.sfbay/detail.jsp?cr=6617767
> 
> Thus far this passes all tests on Solaris; I'm emailing with Kelly re JPRT to 
> test on other platforms.  "all tests" in this case means regression tests for 
> Java Modules; I don't see an applicable test for the java.lang.System.
> 
> os.name relates to os.platform thusly:
> 
> os.name		os.platform
> SunOS		solaris
> Linux		linux
> Windows...	windows
> 
> For Windows, the "..." means any kind of windows.  The other names were chosen 
> based on what is shown in the spec section 2.12 (Platform Binding).
> 
> I updated the javadoc in System.java to add os.platform, but am not sure it is 
> necessary nor sufficient.  Must all java implementations provide os.platform? 
>   And w/o further documentation, it's not very clear what that means, and I 
> don't see an "obvious" place to put an explanation.
> 
> I'm not sure about "Unix system-like-(unknown)".  The string has spaces,
> unlike the others, which might be a problem.  I don't know if it is a 
> trademark problem.  I could presumably put in the circled-R, but that wouldn't 
> really help anyone looking for a simple check for that string (it's a pain to 
> get that symbol).  The words currently used are what the following Wikipedia 
> entry suggests are acceptable to The Open Group:
> 
>      http://en.wikipedia.org/wiki/Unix-like
> 
> Perhaps it should just be "(unknown").  I'm open to suggestions.
> Thanks,
> 	Dave
> 
> 
> _______________________________________________
> modules-dev mailing list
> modules-dev at openjdk.java.net
> http://mail.openjdk.java.net/mailman/listinfo/modules-dev



More information about the modules-dev mailing list