JDK 16 RFR of JDK-8250660: Clarify that WildcardType and AnnotatedWildcardType bounds methods return one
Mandy Chung
mandy.chung at oracle.com
Wed Aug 5 21:41:52 UTC 2020
This looks good. This will prepare for the future when Java supports
multiple bounds.
Mandy
On 8/5/20 2:37 PM, Joe Darcy wrote:
> Hello,
>
> Addressing some feedback from off-list discussions with Mandy, I
> propose changing the API notes to:
>
> @apiNote While to date a wildcard may have at most one
> upper[lower] bound, callers of this method should be written to
> accommodate multiple bounds.
>
> Thanks,
>
> -Joe
>
> On 8/3/2020 9:24 AM, Joe Darcy wrote:
>> Hi David,
>>
>> To provide a bit more context, the API was consciously designed to be
>> future-proofed against the possibility of Java supporting multiple
>> bounds here (JDK-4891872). As of yet, that change has not come to
>> pass, and as you note may never come to pass. So besides in addition
>> to the links into the JLS, I think it is reasonable to include an API
>> note acknowledging the situation. How about:
>>
>> This method supports the existence of multiple bounds, but to
>> date, a wildcard may have at most one upper/lower bound.
>>
>> -Joe
>>
>>
More information about the core-libs-dev
mailing list