JDK 16 RFR of JDK-8250660: Clarify that WildcardType and AnnotatedWildcardType bounds methods return one

Joe Darcy joe.darcy at oracle.com
Mon Aug 3 23:45:15 UTC 2020


Hi David,

On 8/3/2020 4:42 PM, David Holmes wrote:
> Hi Joe,
>
> On 4/08/2020 2: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, 
>
> Okay so we want to keep the API. :)


I don't see us getting rid of this one :-)


>
>> 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.
>
> "to date" is just another form of "in the current version".
>
> Sorry I find it hard to suggest suitable text when I don't think it 
> necessary to say anything.
>
> Best to let others endorse this one.


Fair enough; thanks,

-Joe



More information about the core-libs-dev mailing list