RFR: JDK-8034906 Fix typos, errors and Javadoc differences in java.time

Stephen Colebourne scolebourne at joda.org
Wed Feb 19 12:04:09 UTC 2014


On 19 February 2014 11:39, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 19/02/2014 11:08, David Holmes wrote:
>>
>> Hi Stephen,
>>
>> This could be construed as a spec-change, even if a typo :(
>>
>> - * which are too large to fit in an {@code int} and throw a {@code
>> DateTimeException}.
>> + * which are too large to fit in an {@code int} and throw an {@code
>> UnsupportedTemporalTypeException}.
>>
>> David
>
> From what I can tell, this is LocalDate.get(TemporalField) and the @throws
> already declares the specific exception for the out of range case. So I
> think this one is okay and seems to just adjusting the method description so
> that it matches declaration (is that right?).

The throws clause says "UnsupportedTemporalTypeException - if the
field is not supported or the range of values exceeds an int", so I
think this change can be justified under that. The code follows the
throws clause.

UnsupportedTemporalTypeException extends DateTimeException, so the
description is not broken, just less specific than it could be, but
the throws clause is correctly specific.

Stephen



More information about the core-libs-dev mailing list