[threeten-dev] [threeten-develop] Review for minor update to ValueRange checkValidIntValue

Stephen Colebourne scolebourne at joda.org
Tue Mar 5 05:49:10 PST 2013


I don't think this change can go in.

The checkValidValue methods are public, and so can be called by anyone
at any time in any way. The UTTE is intended for use when the Field or
Unit passed in is unsupported by the target object. In these methods,
the field is optional, and supported/not-supported is not a quality of
the ValueRange class. Thus UTTE is just plain wrong to be thrown here.

A correct fix would be to inline the code change into TemporalAccesor
and anywhere else that has a similar use of the check method. If it is
widely used, a package scoped method (in an appropriate location) may
be a solution.

thanks
Stephen



On 4 March 2013 17:53, roger riggs <roger.riggs at oracle.com> wrote:
> Hi,
>
> A simple fix for the exception and message when TemporalAccessor.get()
> is used (incorrectly) to retrieve Fields with long values.
>
> Webrev:  http://cr.openjdk.java.net/~rriggs/webrev-checkvalid-274/
>
> Thanks, Roger
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> threeten-develop mailing list
> threeten-develop at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/threeten-develop
>


More information about the threeten-dev mailing list