harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [classlib][security] Compatibility issue for UnresolvedPermission.getUnresolvedCerts()
Date Wed, 10 Jan 2007 15:23:21 GMT
Ok - agreed

On Jan 10, 2007, at 6:14 AM, Alexey Varlamov wrote:

> 2007/1/9, Geir Magnusson Jr. <geir@pobox.com>:
>>
>> On Jan 9, 2007, at 8:52 AM, Tim Ellison wrote:
>>
>> > Geir Magnusson Jr. wrote:
>> >> I disagree with you all :)
>> >>
>> >> The spec is not that ambiguous - it says :
>> >>
>> >>   Returns : the signer certificates for the underlying permission
>> >>   that has not been resolved, or null, if there are no signer
>> >>   certificates. Returns a new array each time this method is  
>> called.
>> >>
>> >> Given that it says "Returns a new array each time this method is
>> >> called", I'd return an empty array, so that if people aren't  
>> checking
>> >> for null (why would you, it says it will return an array....),  
>> they
>> >> don't get an NPE.
>
> Nope, the spec directly says "returns ... null, if there are no signer
> certificates". The second sentence is mainly about internal array
> immutability, i.e. a user cannot modify the permission certificates by
> changing the returned value. This is formulated a bit vaguely, but
> still understandable.
>
> [snip]
>>
>> But I thought you said
>>
>> "returns null on Harmony, as required by the spec."
>>
>> The spec could be read to require that you return an empty array,
>> rather than null.
>
> No, clearly not.
>
>>
>> geir
>>
>>


Mime
View raw message