On 14 November 2014 05:13, Stefan Bodewig <bode...@apache.org> wrote:
> On 2014-11-14, sebb wrote:
>
>> On 12 November 2014 20:40, Emmanuel Bourg <ebo...@apache.org> wrote:
>>> Le 12/11/2014 21:02, bode...@apache.org a écrit :
>
>>>>      public int readBits(final int count) throws IOException {
>>>> -        if (count < 0 || count > 32) {
>>>>>        if (count < 0 || count > 31) {
>>>>              throw new IllegalArgumentException("count must be between 0 
>>>> and 32");
>>>>          }
>>>>          while (bitsCachedSize < count) {
>
>>> I think the message of the exception has to be updated too.
>
>> It's OK if between is interpreted as meaning strictly between, i.e.
>> not equal to the end points.

<pedantic mode>
Oops, that is incorrect - 0 is allowed (but 32 is not).

But the message has since been fixed and is now unambiguous.
Thanks!

>> But I agree that it is not very clear currently and could be improved.
>
> At least it now says 31 again
>
> http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/utils/BitInputStream.java?r1=1639351&r2=1639350&pathrev=1639351
>
> but both of you are correct, it is less than clear, I'll try a better
> message.
>
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to