RFR 9: 8048124 Read hijrah-config-umalqura.properties as a resource
Stanimir Simeonoff
stanimir at riflexo.com
Mon Oct 20 18:33:13 UTC 2014
Hi,
A minor issue: there are quite a few instances of parsing integers via
Integer.valueOf(String) instead just Integer.parseInt(String):
HijrahChronology.java:
864 int year = Integer.valueOf(key);
972 months[i] = Integer.valueOf(numbers[i]);
Those should be optimized not to create substrings either
994 ymd[0] = Integer.valueOf(string.substring(0, 4));
995 ymd[1] = Integer.valueOf(string.substring(5, 7));
996 ymd[2] = Integer.valueOf(string.substring(8, 10));
Stanimir
On Mon, Oct 20, 2014 at 9:17 PM, roger riggs <roger.riggs at oracle.com> 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
>
> Thanks, Roger
>
>
> On 10/20/2014 11:25 AM, Alan Bateman wrote:
>
>> On 20/10/2014 16:11, roger riggs wrote:
>>
>>> What permission would be needed to read the resource?
>>> The limited doPrivileged should include the minimum permission.
>>>
>> The resources will be be resources.jar so I think read access to that
>> should be sufficient. If you run a small test with -Djava.security.manager
>> that triggers the config file to load then it would help verify that. When
>> we move to the modular image then the resources will be elsewhere in the
>> runtime image so if you really want to use limited doPrivileged here then
>> access to ${java.home}/** should do it. Of course not using limited
>> doPrivileged is a possibility too.
>>
>> -Alan
>>
>>
>
More information about the core-libs-dev
mailing list