On 17 March 2013 13:19, Simone Tripodi <simonetrip...@apache.org> wrote:
>>>      /**
>>> +     * The default number of byte shift for decode.

[Actually, it's not a default - the value is fixed, and cannot be
changed without breaking the code.]

>>> +     */
>>> +    private static final int OUT_SHIFT = 4;
>>> +
>>
>> The Javadoc needs to say why the value 4 is used, otherwise it's still
>> a magic number.
>>
>
> it is even part of black magic if you take in consideration that is it
> a private field of a package-protected class used for internal-use
> only

The point is that the code needs to be documented to make it
understandable for future maintainers.

Why is the output shifted by 4 bits?

It seems to be because it is half a byte, so we should use something
like Byte.SIZE / 2 to define the constant.

Committed in r1457681

> http://people.apache.org/~simonetripodi/
> http://simonetripodi.livejournal.com/
> http://twitter.com/simonetripodi
> http://www.99soft.org/
>
> ---------------------------------------------------------------------
> 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