On Mon, 12 Oct 2020 22:17:58 GMT, Marcono1234
<[email protected]> 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 836:
>
>> 834: * otherwise {@code false}
>> 835: */
>> 836: public boolean isHexDigit(int ch) {
>
> Should this method be `static`? Or otherwise should it consider the
> `uppercase()` setting?
> (Same for `fromHexDigit` and all the other subsequent methods)
>
> These methods being instance methods is likely pretty confusing because they
> are unrelated to the HexFormat instance
> and makes using them cumbersome because the user has to create a HexFormat
> instance first.
Agree. I had the very same thought. In fact, these format agnostic methods have
little to do with formatting.
-------------
PR: https://git.openjdk.java.net/jdk/pull/482