Re: RFR: 8251989: Hex formatting and parsing utility [v20]

2020-12-15 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v19]

2020-12-11 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v19]

2020-12-09 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-07 Thread Joe Darcy
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

Re: RFR: 8251989: Hex formatting and parsing utility [v18]

2020-12-05 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-04 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-04 Thread Joe Darcy
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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-04 Thread Joe Darcy
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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-04 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-04 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v17]

2020-12-02 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v16]

2020-12-02 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v16]

2020-12-02 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v14]

2020-12-02 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v15]

2020-12-02 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v14]

2020-12-02 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-12-02 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v14]

2020-12-01 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-12-01 Thread Roger Riggs
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. >>

Re: RFR: 8251989: Hex formatting and parsing utility [v13]

2020-12-01 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-12-01 Thread Roger Riggs
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. >>

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-12-01 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-12-01 Thread Daniel Fuchs
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, >>

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-11-30 Thread Naoto Sato
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

Re: RFR: 8251989: Hex formatting and parsing utility [v12]

2020-11-30 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Naoto Sato
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-30 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Naoto Sato
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

Re: RFR: 8251989: Hex formatting and parsing utility [v11]

2020-11-27 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-27 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-25 Thread Naoto Sato
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

Re: RFR: 8251989: Hex formatting and parsing utility [v10]

2020-11-25 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v9]

2020-10-27 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-26 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v9]

2020-10-26 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-26 Thread Roger Riggs
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:

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-23 Thread Roger Riggs
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 >

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-23 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-23 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v8]

2020-10-22 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v7]

2020-10-21 Thread Marcono1234
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

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

2020-10-21 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v7]

2020-10-21 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility

2020-10-20 Thread Roger Riggs
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

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

2020-10-20 Thread Daniel Fuchs
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

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

2020-10-20 Thread Roger Riggs
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

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

2020-10-20 Thread Roger Riggs
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

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

2020-10-20 Thread Roger Riggs
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

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

2020-10-20 Thread Chris Hegarty
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

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

2020-10-20 Thread Chris Hegarty
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

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

2020-10-19 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v5]

2020-10-19 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v5]

2020-10-19 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v5]

2020-10-16 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Roger Riggs
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: >>>

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Roger Riggs
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: >> /*

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Roger Riggs
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: > ``` >

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-16 Thread Chris Hegarty
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-15 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-15 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v4]

2020-10-15 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v3]

2020-10-15 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v3]

2020-10-14 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-14 Thread Daniel Fuchs
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-13 Thread Tagir F . Valeev
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-13 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-13 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-13 Thread Marcono1234
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

Re: RFR: 8251989: Hex formatting and parsing utility [v2]

2020-10-13 Thread Roger Riggs
> 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

Re: RFR: 8251989: Hex formatting and parsing utility

2020-10-13 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility

2020-10-13 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility

2020-10-13 Thread Roger Riggs
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

Re: RFR: 8251989: Hex formatting and parsing utility

2020-10-13 Thread Roger Riggs
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

Re: RFR 8251989: Hex formatting and parsing

2020-09-03 Thread Douglas Surber
> 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.

Re: RFR 8251989: Hex formatting and parsing

2020-09-03 Thread Raffaello Giulietti
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

Re: RFR 8251989: Hex formatting and parsing

2020-09-03 Thread Roger Riggs
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

Re: RFR 8251989: Hex formatting and parsing

2020-09-02 Thread Douglas Surber
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

RFR 8251989: Hex formatting and parsing

2020-09-02 Thread Roger Riggs
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