[9] RFR of 8065556: (bf) Buffer.position and other methods should include detail in IAE

Francis Galiegue fgaliegue at gmail.com
Tue Mar 24 01:09:32 UTC 2015


On Tue, Mar 24, 2015 at 12:20 AM, Martin Buchholz <martinrb at google.com> wrote:
>
>
> On Mon, Mar 23, 2015 at 3:41 PM, John Rose <john.r.rose at oracle.com> wrote:
>>
>>
>> Eventually I think we'll have good enough library functions for range
>> checks that we can avoid working with explicit range check expressions.
>> Even experts get them wrong when subexpressions can overflow (for
>> subsequence range checks).
>
>
> Guava has Precondtions:
> https://code.google.com/p/guava-libraries/wiki/PreconditionsExplained
>

Well, if we go this way, and since we are talking about ranges, Guava
also has Range<C>; which is pretty darn useful.

Unfortunately no IntRange, LongRange or DoubleRange though...

-- 
Francis Galiegue, fgaliegue at gmail.com, https://github.com/fge
JSON Schema in Java: http://json-schema-validator.herokuapp.com
Parsers in pure Java: https://github.com/fge/grappa



More information about the core-libs-dev mailing list