RFR 9: 8048124 Read hijrah-config-umalqura.properties as a resource

Alan Bateman Alan.Bateman at oracle.com
Mon Oct 20 18:53:30 UTC 2014


On 20/10/2014 19:17, roger riggs wrote:
> Hi,
>
> Updated with recommendations.
>
> Webrev:
> http://cr.openjdk.java.net/~rriggs/webrev-hijrah-config-8049376/
> Issue:
> https://bugs.openjdk.java.net/browse/JDK-8048124
>
"<<ALL FILES>>" seems excessive when I think you only need 
${java.home}/- but still better than all.

A minor comment is that expression for the try-with-resources uses 
AccessController with parameters over 4 lines isn't easy to read. It 
might be a bit clearer with multiple statements, as in:

PrivilegedAction<InputStream> action = () -> HijrahChronology 
.class.getResourceAsStream(resourceName);
Permission permission = new FilePermission("<<ALL FILES>>", "read");
try (InputStream in = AccessController.doPrivileged(action, null, 
permission)) {
     :
}



More information about the core-libs-dev mailing list