On Wed, 14 Oct 2020 13:38:51 GMT, Roger Riggs <[email protected]> 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 the class?
>
> 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();
...
}
-------------
PR: https://git.openjdk.java.net/jdk/pull/482