RFR (JDK10) 8183743: Umbrella: add overloads that take a Charset parameter

Alan Bateman Alan.Bateman at oracle.com
Sun Dec 3 19:34:08 UTC 2017



On 01/12/2017 20:35, Joe Wang wrote:
> :
>
>>
>> I think URLDecoder.decode methods should have @throws 
>> IllegalArgumentException. I realize it's implementation specific as 
>> to whether IAE is thrown with bad input but given that the RI does 
>> throw IAE then consumers of the API should be prepared for it. The 
>> @implNote can stay and probably should be copied into the legacy 
>> decode method too.
>
> I added @throws IAE. On a 2nd thought, would that give no flexibility 
> to alternative impls as the general (class) spec had given? With this 
> addition, it becomes a requirement.
If the @throws description starts with "if the implementation ..." then 
it should be clear that it is optional.

-Alan


More information about the core-libs-dev mailing list