[threeten-dev] Java.time -Xlint warning cleanup

Stephen Colebourne scolebourne at joda.org
Thu Jul 11 14:29:03 PDT 2013


If you remove the @param <R> then its fine to commit.
Stephen

On 11 July 2013 22:25, roger riggs <roger.riggs at oracle.com> wrote:
> Hi,
>
> In ChronoLocalDate.atTime, with the previous definition
>     default <R extends ChronoLocalDate> ChronoLocalDateTime<R>
> atTime(LocalTime localTime) {...}
>
> I could not find a way to silence the unchecked warning.
>
> Also, it allowed the caller, without any warning, to implicitly change the
> generic parameter.
>
>      ChronoLocalDateTime<ThaiBuddhistDate> jd =
> HijrahChronology.INSTANCE.dateNow().atTime(LocalTime.NOON);
>
> Thanks, Roger
>
>
>
>
> On 7/11/2013 5:09 PM, Stephen Colebourne wrote:
>>
>> Looks fine, except that the public API in ChronoLocalDate has changed.
>> I'm not sure whether its a good change or not though.
>> But you have left in a redundent @param <R>
>>
>> thanks
>> Stephen
>>
>>
>> On 11 July 2013 21:27, roger riggs <roger.riggs at oracle.com> wrote:
>>>
>>> Hi,
>>>
>>> An ongoing goal is to cleanup the JDK build so that compiles do not
>>> produce
>>> warnings.  They may not go in with the rest of the current updates but I
>>> wanted
>>> to understand the impact.
>>>
>>> The bulk of warnings in java.time are related to unchecked casts.
>>> But some API changes seemed to be the better solution than just
>>> suppressing the warnings.
>>>
>>> Please review:
>>>
>>> http://cr.openjdk.java.net/~rriggs/webrev-unchecked-cleanup-8020418/
>>>
>>> Thanks, Roger
>>>
>>>
>>>
>


More information about the threeten-dev mailing list