Skip to content

Commit c2a785f

Browse files
authored
[hotfix][client] Use more efficient EnumMap (#1882)
1 parent 3551d1f commit c2a785f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fluss-client/src/main/java/org/apache/fluss/client/converter/ConverterCommons.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
import java.math.BigDecimal;
2626
import java.util.Arrays;
27-
import java.util.HashMap;
27+
import java.util.EnumMap;
2828
import java.util.HashSet;
2929
import java.util.Map;
3030
import java.util.Set;
@@ -43,7 +43,7 @@ final class ConverterCommons {
4343
static final Map<DataTypeRoot, Set<Class<?>>> SUPPORTED_TYPES = createSupportedTypes();
4444

4545
private static Map<DataTypeRoot, Set<Class<?>>> createSupportedTypes() {
46-
Map<DataTypeRoot, Set<Class<?>>> map = new HashMap<>();
46+
Map<DataTypeRoot, Set<Class<?>>> map = new EnumMap<>(DataTypeRoot.class);
4747
map.put(DataTypeRoot.BOOLEAN, setOf(Boolean.class));
4848
map.put(DataTypeRoot.TINYINT, setOf(Byte.class));
4949
map.put(DataTypeRoot.SMALLINT, setOf(Short.class));

0 commit comments

Comments
 (0)