RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum [v2]

Shaojin Wen duke at openjdk.org
Wed Jul 10 23:18:55 UTC 2024


On Wed, 10 Jul 2024 13:01:21 GMT, Chen Liang <liach at openjdk.org> wrote:

> The internal enum representation is an unnecessary abstraction; a boolean for uppercase is used for all public endpoints in `isUpperCase` and `toString`, so using the same boolean internally makes sense.
> 
> Do you think we should call this field `ucase` or `uppercase`?

`ucase` is a name that has been used in this class. It is used in the formatOptDelimiter method. `ucase` is an abbreviation, but it is easy to understand. Using the name `ucase` also requires fewer changes than `uppercase`.

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

PR Comment: https://git.openjdk.org/jdk/pull/20060#issuecomment-2221684843


More information about the core-libs-dev mailing list