RFR: 8154231: Simplify access to System properties from JDK code

Ulf Zibis Ulf.Zibis at CoSoCo.de
Wed Apr 20 15:57:07 UTC 2016


here my comments:

Am 20.04.2016 um 16:44 schrieb Claes Redestad:
> Hello,
> now that the sun.security.action package is encapsulated we can simplify internal code to get 
> System properties.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8154231
> Webrev: http://cr.openjdk.java.net/~redestad/8154231/webrev.01/
> This adds a few convenience methods to GetPropertyAction[1] and GetIntegerAction[2].

- In the original version of ProcessBuilder.java line 472 there was a nice example using lambda 
expression. Wouldn't this be applicable also for these new methods here?
- Isn't the "theProp" naming style something from an old usage where all members have been named 
myXyz? I more would like "propName" or just "property".
- In Integer.getProperty the default substitution is done twice, lines: 143, 148. So maybe return to 
the "immediate return in if...else clause" style.


More information about the core-libs-dev mailing list