RFR: 8251989: Hex formatting and parsing utility [v6]

Roger Riggs rriggs at openjdk.java.net
Tue Oct 20 14:40:24 UTC 2020


On Tue, 20 Oct 2020 09:44:51 GMT, Chris Hegarty <chegar at openjdk.org> wrote:

>> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Correct length of StringBuilder in formatHex;
>>   Correct bug in formatHex(char[], 2, 3) and add test for subranges of char[]
>
> src/java.base/share/classes/java/util/HexFormat.java line 64:
> 
>> 62:  * and {@link #formatHex(Appendable, byte[]) formatHex(Appendable, byte[])}.
>> 63:  * The formatted output can be appended to {@link StringBuilder}, {@link System#out},
>> 64:  * {@link java.io.Writer}, and {@link java.io.PrintStream}, all of which are {@link Appendable}.
> 
> This seems like an arbitrary list of Appendables. Suggest to restructure the sentence to make it clear that these are
> just some common examples, and maybe drop a few.

Will re-phrase to include a list of typical Appendable classes.

> src/java.base/share/classes/java/util/HexFormat.java line 127:
> 
>> 125:  *
>> 126:  * @implSpec
>> 127:  * This class is immutable and thread-safe.
> 
> I'm curious why this is an implSpec, and not just a normative statement? HexFormat is a final class after all, there is
> just one implementation.

Good point, will remove @ImplSpec.

-------------

PR: https://git.openjdk.java.net/jdk/pull/482


More information about the core-libs-dev mailing list