On Tue, 13 Oct 2020 16:24:32 GMT, Roger Riggs <rri...@openjdk.org> 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 their own context for the output. I was thinking of the case where the caller invokes it by accident (due to incorrect code, e.g. `"..." + hexFormat` instead of `"..." + hexFormat.toHexDigits(...)`) and then wonders what "uppercase: true, ..." means or where it even comes from. For example `java.util.Optional` also includes "Optional[...]". ------------- PR: https://git.openjdk.java.net/jdk/pull/482