> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 9 Dec 2020 16:46:54 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Fri, 4 Dec 2020 22:13:21 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/util/HexFormat.java line 936:
>>
>>> 934: * if any of the characters is not a hexadecimal character
>>> 935: */
>>> 936: public int fromHexDigits(CharSequence string) {
>>
>> I recommend t
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Fri, 4 Dec 2020 20:39:58 GMT, Joe Darcy wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Add class level clarification of use of uppercase for primitive conversions
>> Switched order of declaration of a couple o
On Wed, 2 Dec 2020 16:33:15 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
On Wed, 2 Dec 2020 16:33:15 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
On Wed, 2 Dec 2020 16:33:15 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
On Wed, 2 Dec 2020 16:33:15 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 2 Dec 2020 14:55:18 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 2 Dec 2020 11:14:18 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Increased memory to 4G for the test and add diagnostic info for OOME
>
> Changes requested by dfuchs (Reviewer).
@dfuch
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Tue, 1 Dec 2020 22:50:19 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified paramet
On Tue, 1 Dec 2020 16:08:05 GMT, Roger Riggs wrote:
> This is a private method, documented more than is usual.
Sorry - my comment was misplaced. I was mostly concerned with the *public*
methods that follow.
(` public int fromHexDigits(CharSequence string)` and friends)
They all say that `* The
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Tue, 1 Dec 2020 11:25:15 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Clarified hexadecimal characters used in converting from characters to
>> values to be strictly 0-9, a-f, and A-F.
>>
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Tue, 1 Dec 2020 10:37:40 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Clarified hexadecimal characters used in converting from characters to
>> values to be strictly 0-9, a-f, and A-F.
>>
On Mon, 30 Nov 2020 20:56:17 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Fri, 27 Nov 2020 17:01:35 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/util/HexFormat.java line 528:
>>
>>> 526: * a range of the character array.
>>> 527: *
>>> 528: * Each byte value is parsed as the prefix, two case insensitive
>>> hexadecimal characters,
>>
On Mon, 30 Nov 2020 20:56:17 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
Hi Roger,
Thanks for your thought and I agree with you. Since this is a utility
primarily meant for developers, not end users, limiting the "hexadecimal
string/character" in Latin-1 seems reasonable.
Naoto
On 11/30/20 7:42 AM, Roger Riggs wrote:
Hi Naoto,
There are a couple of ways consist
Hi Naoto,
There are a couple of ways consistency can be achieved (and with what).
The existing hex conversions from strings to hex all delegate to
Character.digit(ch, radix) which allows
both digits and letters beyond Latin1. (See Integer.valueOf(string,
radix), Long.valueOf(string, radix), et
On Fri, 27 Nov 2020 16:57:07 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/util/HexFormat.java line 853:
>>
>>> 851: */
>>> 852: public int fromHexDigit(int ch) {
>>> 853: int value = Character.digit(ch, 16);
>>
>> Do we need to limit parsing the hex digit for onl
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Fri, 27 Nov 2020 16:56:37 GMT, Chris Hegarty wrote:
>> It is the byte array that is formatted, the result is a hexadecimal string.
>> It helps make a stronger distinction between the byte array functions and
>> the primitive functions.
>
>> It is the byte array that is formatted, the result i
On Wed, 25 Nov 2020 23:36:22 GMT, Naoto Sato wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits sinc
On Fri, 27 Nov 2020 10:46:09 GMT, Chris Hegarty wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits s
On Fri, 27 Nov 2020 09:54:07 GMT, Chris Hegarty wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits s
On Fri, 27 Nov 2020 16:51:02 GMT, Roger Riggs wrote:
> It is the byte array that is formatted, the result is a hexadecimal string.
I don't understand. How is the byte array formatter? Do we have "formatted
byte arrays" and "unformatted byte arrays"? Are they formatted somehow with
prefix, d
On Fri, 27 Nov 2020 09:40:10 GMT, Chris Hegarty wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits s
On Thu, 26 Nov 2020 00:08:37 GMT, Naoto Sato wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits sinc
On Fri, 27 Nov 2020 09:33:26 GMT, Chris Hegarty wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 19 additional
>> commits s
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Wed, 25 Nov 2020 22:51:44 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Tue, 27 Oct 2020 03:09:32 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Fri, 23 Oct 2020 16:34:54 GMT, Roger Riggs wrote:
>> Do you want to refactor some of the classes where `HexFormat` would be a
>> well-suited replacement for the current code, and what do you think about my
>> other previous review comments (mostly formatting related)?
>> The bridgekeeper bot
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Mon, 12 Oct 2020 21:17:47 GMT, Marcono1234
wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Review comment updates to class javadoc
>
> src/java.base/share/classes/java/util/HexFormat.java line 148:
>
>> 146:
On Fri, 23 Oct 2020 16:21:29 GMT, Marcono1234
wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Review comment updates to class javadoc
>
> Do you want to refactor some of the classes where `HexFormat` would be a
>
On Thu, 22 Oct 2020 15:55:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Thu, 22 Oct 2020 15:55:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 21 Oct 2020 17:33:26 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 20 Oct 2020 14:37:01 GMT, Roger Riggs wrote:
>> 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?
>> Hex
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On 10/12/20 7:08 PM, Marcono1234 wrote:
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()` setti
On Mon, 19 Oct 2020 22:52:31 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 20 Oct 2020 10:26:59 GMT, Chris Hegarty 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
On Tue, 20 Oct 2020 09:44:51 GMT, Chris Hegarty 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
On Tue, 20 Oct 2020 09:37:23 GMT, Chris Hegarty 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
On Mon, 12 Oct 2020 22:17:58 GMT, Marcono1234
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
On Mon, 19 Oct 2020 22:52:31 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Mon, 19 Oct 2020 16:35:19 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase. The pull
>> request contains 10 additional commits sin
On Fri, 16 Oct 2020 19:56:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Fri, 16 Oct 2020 15:22:37 GMT, Roger Riggs wrote:
>> The HexFormat API currently uses an indexing model for arrays and strings
>> based on an index and a length.
>> Many other APIs in the JDK use an index model of `fromIndex` and `toIndex`
>> (exclusive).
>>
>> They are equivalent and conve
On Fri, 16 Oct 2020 14:46:11 GMT, Roger Riggs wrote:
>>> Since the instances are immutable, it seemed useful to emphasize that only
>>> the instance returned has the requested
>>> change. Discarding the return value was incorrect programming. The original
>>> instance is not modified.
>>
>> Un
On Fri, 16 Oct 2020 14:24:41 GMT, Chris Hegarty wrote:
>>> Maybe I'm being too pedantic, but is the use of the term _copy_ for the
>>> withers overly prescriptive, and possibly
>>> limiting an implementation? For example, for `withDelimiter` does _copy_
>>> preclude such an implementation:
>>>
On Fri, 16 Oct 2020 14:00:38 GMT, Roger Riggs wrote:
> Since the instances are immutable, it seemed useful to emphasize that only
> the instance returned has the requested
> change. Discarding the return value was incorrect programming. The original
> instance is not modified.
Understood, and
On Fri, 16 Oct 2020 14:00:38 GMT, Roger Riggs wrote:
>> Maybe I'm being too pedantic, but is the use of the term _copy_ for the
>> withers overly prescriptive, and possibly
>> limiting an implementation? For example, for `withDelimiter` does _copy_
>> preclude such an implementation:
>> /*
On Fri, 16 Oct 2020 13:10:24 GMT, Chris Hegarty wrote:
> Maybe I'm being too pedantic, but is the use of the term _copy_ for the
> withers overly prescriptive, and possibly
> limiting an implementation? For example, for `withDelimiter` does _copy_
> preclude such an implementation:
> ```
>
On Fri, 16 Oct 2020 11:46:47 GMT, Chris Hegarty wrote:
>> Please review the corresponding CSR:
>> https://bugs.openjdk.java.net/browse/JDK-8251991
>
> Hi Roger,
>
> This looks very good.
>
> I have a few minor comments:
>
> 1. Add an explicit type parameter to toHexDigits
> 2. Some clean
On Thu, 15 Oct 2020 18:22:12 GMT, Roger Riggs wrote:
>> Marked as reviewed by dfuchs (Reviewer).
>
> Please review the corresponding CSR:
> https://bugs.openjdk.java.net/browse/JDK-8251991
Hi Roger,
This looks very good.
I have a few minor comments:
1. Add an explicit type parameter to t
On Thu, 15 Oct 2020 18:07:10 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev
>> excludes the unrelated changes brought in by the merge/rebase. The pull
>> request contains seven additional commits
On Thu, 15 Oct 2020 16:58:37 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 14 Oct 2020 19:12:37 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 13 Oct 2020 21:56:31 GMT, Marcono1234
wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Various code review comments, rename UpperCase and LowerCase methods to
>> match Character, remove unnecessary Class na
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Wed, 14 Oct 2020 13:46:59 GMT, Daniel Fuchs wrote:
>> Its a bit of a space/time trade-off. And the balance point will change if
>> the class is converted in the future to a
>> Valhalla primitive class. At this point it looks to me like a premature
>> optimization.
>
> OK - but just to avoid
On Wed, 14 Oct 2020 09:53:23 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Various code review comments, rename UpperCase and LowerCase methods to
>> match Character, remove unnecessary Class na
On Wed, 14 Oct 2020 13:38:51 GMT, Roger Riggs wrote:
>> src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java line
>> 1116:
>>
>>> 1114: }
>>> 1115:
>>> 1116: HexFormat format = HexFormat.of().withUpperCase();
>>
>> Should/can this be a static final field in t
On Wed, 14 Oct 2020 09:28:25 GMT, Daniel Fuchs wrote:
>> Roger Riggs has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Various code review comments, rename UpperCase and LowerCase methods to
>> match Character, remove unnecessary Class na
On Tue, 13 Oct 2020 19:51:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 13 Oct 2020 19:51:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 13 Oct 2020 16:24:32 GMT, Roger Riggs wrote:
>> src/java.base/share/classes/java/util/HexFormat.java line 1015:
>>
>>> 1013: */
>>> 1014: @Override
>>> 1015: public String toString() {
>>
>> Might be useful to also include the class name?
>
> The caller may need to provide
On Tue, 13 Oct 2020 19:51:30 GMT, Roger Riggs wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified parame
On Tue, 13 Oct 2020 16:15:51 GMT, Roger Riggs wrote:
>> test/jdk/java/util/HexFormat/HexFormatTest.java line 406:
>>
>>> 404:
>>> 405: int byteVal = hex.fromHexDigits(byteStr);
>>> 406: assert(byteStr.equals("7f"));
>>
>> Why use regular `assert` statements in this test
> java.util.HexFormat utility:
>
> - Format and parse hexadecimal strings, with parameters for delimiter,
> prefix, suffix and upper/lowercase
> - Static factories and builder methods to create HexFormat copies with
> modified parameters.
> - Consistent naming of methods for conversion of byt
On Mon, 12 Oct 2020 23:05:44 GMT, Marcono1234
wrote:
> Also is it common practice to use `System.out` in JDK tests? In my opinion it
> often does not add much value once the
> unit test implementation has been completed because the output is not checked
> during tests automatically anyways and
On Mon, 12 Oct 2020 20:48:52 GMT, Marcono1234
wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified param
On Mon, 12 Oct 2020 22:36:34 GMT, Marcono1234
wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified param
On Mon, 12 Oct 2020 20:41:20 GMT, Marcono1234
wrote:
>> java.util.HexFormat utility:
>>
>> - Format and parse hexadecimal strings, with parameters for delimiter,
>> prefix, suffix and upper/lowercase
>> - Static factories and builder methods to create HexFormat copies with
>> modified param
> Date: Thu, 3 Sep 2020 16:13:49 -0400
> From: Roger Riggs mailto:roger.ri...@oracle.com>>
> To: core-libs-dev@openjdk.java.net <mailto:core-libs-dev@openjdk.java.net>
> Subject: Re: RFR 8251989: Hex formatting and parsing
> Message-ID: <7135b593-e48e-6931-4577-eb4350e51.
Hi Roger,
In Formatter
(1) The javadoc reads: "Returns up to sixteen [...]" rather than
"Returns sixteen [...]", similar to the other toHex() methods.
(2) equals() and hashCode() are missing.
In Parser
(1) In methods fromHex(), isHex(), xxxFromHex(), you probably meant
"static" rather tha
Date: Wed, 2 Sep 2020 16:26:07 -0400
From: Roger Riggs mailto:roger.ri...@oracle.com>>
To: core-libs-dev mailto:core-libs-dev@openjdk.java.net>>
Subject: RFR 8251989: Hex formatting and parsing
Message-ID: <180eca84-19fe-2dc4-9e57-1d05328e1...@oracle.com
<mailto:180eca84-1
Roger Riggs mailto:roger.ri...@oracle.com>>
> To: core-libs-dev <mailto:core-libs-dev@openjdk.java.net>>
> Subject: RFR 8251989: Hex formatting and parsing
> Message-ID: <180eca84-19fe-2dc4-9e57-1d05328e1...@oracle.com
> <mailto:180eca84-19fe-2dc4-9e57-1d05328
Please review the updated API in the Javadoc.
http://cr.openjdk.java.net/~rriggs/hex-formatter/java.base/java/util/Hex.html
A few offline contacts encouaged me to explore expanding the support
for formatting and parsing of primitive types.
Adding formatting toHex methods and [arsing fromHex metho
96 matches
Mail list logo