perf: avoid multiple expansion when the number of elements in the MessageConst class is determined (#3721)

`HashSet`, threshold = initialCapacity * 0.75
This commit is contained in:
Xinda
2022-01-26 10:44:01 +08:00
committed by GitHub
parent 493c91a38b
commit 8ce2cdb004
@@ -57,7 +57,7 @@ public class MessageConst {
public static final String KEY_SEPARATOR = " ";
public static final HashSet<String> STRING_HASH_SET = new HashSet<String>();
public static final HashSet<String> STRING_HASH_SET = new HashSet<>(64);
static {
STRING_HASH_SET.add(PROPERTY_TRACE_SWITCH);