On Wed, 14 Oct 2020 13:46:59 GMT, Daniel Fuchs <dfu...@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