RFR 8251989: Hex encoder and decoder utility

Roger Riggs Roger.Riggs at oracle.com
Thu Aug 20 16:32:43 UTC 2020


Hi Chris,

Thanks for the comments, I'll make the updates suggested.

Roger


On 8/20/20 11:33 AM, Chris Hegarty wrote:
>> On 19 Aug 2020, at 22:14, Roger Riggs <Roger.Riggs at oracle.com> wrote:
>>
>> ..
>> JavaDoc:
>> http://cr.openjdk.java.net/~rriggs/hex-javadoc/java.base/java/util/Hex.html
> I like it Roger, very nice. A few minor comments/quibbles:
>
> Hex:
>
> - "Utilities to encode bytes to hex strings and decode hex strings to bytes.” - This class consists solely of “factory methods" for creating encoders and decoders to ..
>
> - In the example, do you want to assert that the byte arrays `bytes` and `dec` are equal?
>
> - RFC 4752 or RFC 2752. Which one is it? ;-)
RFC 4752.
>
> Decoder:
>
> - decode​(char[] chars, int index, int length) - " A valid character array consists only of the delimiters, prefix, suffix, and an even number of hex digits.” - its just the portion of the array that is required to consist of …, right. You need to add “range”, or similar.
>
> Please use “ReturnS” consistently ( I see a few Return (no S) ). Actually, there are a few others, e.g. “Convert”. Can you take pass over all these, in all three classes?
>
> -Chris.



More information about the core-libs-dev mailing list