[9] request for review 8079129: NullPointerException in PKCS#12 Keystore in PKCS12KeyStore.java

Weijun Wang weijun.wang at oracle.com
Tue May 5 14:10:04 UTC 2015


Anyway it looks redundant and error-prone to maintain the length of an 
array in a separate variable.

--Max

On 5/5/2015 8:32 PM, Vincent Ryan wrote:
> Replacing the for loop below with a for-each loop on certs would be fine except that certs can be null.
> I could initialize certs with an empty array on each iteration of the outer loop but it doesn’t seem to gain much overall.
>
>
>> On 4 May 2015, at 13:10, Weijun Wang <weijun.wang at oracle.com> wrote:
>>
>> 1662             for (int i = 0; i < chainLen; i++) {
>>
>>
>> On 5/4/2015 6:08 PM, Vincent Ryan wrote:
>>> Which line?
>>>
>>>> On 2 May 2015, at 02:22, Weijun Wang <weijun.wang at oracle.com> wrote:
>>>>
>>>> Is it safe to just run for-each on certs (if it's not null)?
>>>>
>>>> --Max
>>>>
>>>> On 5/2/2015 6:39 AM, Vincent Ryan wrote:
>>>>> Please review this fix to correct the PKCS12 encoding when a secret key is being stored in one keystore entry and a certificate in another.
>>>>>
>>>>> Thanks.
>>>>>
>>>>>
>>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8079129
>>>>> Webrev: http://cr.openjdk.java.net/~vinnie/8079129/webrev.00/
>>>>>
>>>
>


More information about the security-dev mailing list