mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-10-13 06:15:51 +00:00
perf[orm]: map key codec
This commit is contained in:
1 parent
6b6e653635
commit
d964049ef7
1 file changed
+1
-1
@@ -48,7 +48,7 @@ public class IntMapCodec<V> implements Codec<Map<Integer, V>> {
|
||||
reader.readStartDocument();
|
||||
Map<Integer, V> map = new HashMap<>();
|
||||
while (!BsonType.END_OF_DOCUMENT.equals(reader.readBsonType())) {
|
||||
int key = java.lang.Integer.parseInt(reader.readName());
|
||||
int key = Integer.parseInt(reader.readName());
|
||||
V value = BsonType.NULL.equals(reader.getCurrentBsonType()) ? null : valueCodec.decode(reader, context);
|
||||
map.put(key, value);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user