Skip to content

Commit e727116

Browse files
committed
Replace ConcurrentHashMap with HashMap
1 parent e362e9e commit e727116

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/io/github/amayaframework/server/utils/HeaderMap.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
package io.github.amayaframework.server.utils;
2727

2828
import java.util.*;
29-
import java.util.concurrent.ConcurrentHashMap;
3029

3130

3231
public class HeaderMap implements Map<String, List<String>> {
@@ -38,16 +37,16 @@ private HeaderMap(Map<String, List<String>> map) {
3837
}
3938

4039
public HeaderMap(int initialCapacity) {
41-
map = new ConcurrentHashMap<>(initialCapacity);
40+
map = new HashMap<>(initialCapacity);
4241
}
4342

4443
public HeaderMap() {
45-
map = new ConcurrentHashMap<>();
44+
map = new HashMap<>();
4645
}
4746

4847
public static HeaderMap unmodifiableHeaderMap(HeaderMap headers) {
4948
Objects.requireNonNull(headers);
50-
Map<String, List<String>> retMap = new ConcurrentHashMap<>(headers.map.size());
49+
Map<String, List<String>> retMap = new HashMap<>(headers.map.size());
5150
headers.map.forEach((key, value) -> retMap.put(key, Collections.unmodifiableList(value)));
5251
return new HeaderMap(Collections.unmodifiableMap(retMap));
5352
}

0 commit comments

Comments
 (0)