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

Roger Riggs rriggs at openjdk.java.net
Wed Oct 14 15:11:25 UTC 2020


On Wed, 14 Oct 2020 13:46:59 GMT, Daniel Fuchs <dfuchs at openjdk.org> 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 misunderstanding - I meant a static final field in  jdk.internal.net.http.common.Utils; as in
> public class Utils { ...
>     private static final HexFormat HEX_FORMAT = HexFormat.of().withUpperCase();
>     ...
> }

Yes, that's what I understood.  Still it take up space and gc is aware of it.

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

PR: https://git.openjdk.java.net/jdk/pull/482


More information about the core-libs-dev mailing list