Re: RFR 8146458 Improve exception reporting for Objects.checkIndex/checkFromToIndex/checkFromIndexSize

2016-01-18 Thread Paul Sandoz
Thanks for the feedback. Updated: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8146458-checkIndex-exception-reporting/webrev/ http://cr.openjdk.java.net/~psandoz/jdk9/JDK-8146458-checkIndex-exception-reporting/specdiff/overview-summary.html Changes: - refer to “exception factory function”

Re: RFR 8146458 Improve exception reporting for Objects.checkIndex/checkFromToIndex/checkFromIndexSize

2016-01-16 Thread John Rose
On Jan 15, 2016, at 2:43 PM, Stuart Marks wrote: > > > I think, in order to avoid introducing new functional interfaces, this > information is funneled into a single varargs call, which has to use Integer > boxes, because it then wraps its args into a List (thanks for using the new > List fac

Re: RFR 8146458 Improve exception reporting for Objects.checkIndex/checkFromToIndex/checkFromIndexSize

2016-01-15 Thread Stuart Marks
Hi Paul, I agree with John on a couple points, namely the removal of the two-arg constructors from the exception types, and the use of a term like "factory" instead of "mapper" for the exception-instance-producing functions. An alternative might be "supplier" (though that might cause confusion

Re: RFR 8146458 Improve exception reporting for Objects.checkIndex/checkFromToIndex/checkFromIndexSize

2016-01-15 Thread John Rose
On Jan 11, 2016, at 7:04 AM, Paul Sandoz wrote: > > When the new range check methods Object.check* were added the exception > reporting was a little vague and lossy, but i got a CCC pass to revisit later > on, and John nudged me to sort this out, so here is another more reflective > approach:

RFR 8146458 Improve exception reporting for Objects.checkIndex/checkFromToIndex/checkFromIndexSize

2016-01-11 Thread Paul Sandoz
Hi, When the new range check methods Object.check* were added the exception reporting was a little vague and lossy, but i got a CCC pass to revisit later on, and John nudged me to sort this out, so here is another more reflective approach: http://cr.openjdk.java.net/~psandoz/jdk9/JDK-814645