From 7af6dede5f9a3eadf11e539aa89d25004e9a512b Mon Sep 17 00:00:00 2001 From: godotg Date: Tue, 2 Jul 2024 16:54:46 +0800 Subject: [PATCH] fix[HashMapLongInt]: type conversion error --- .../java/com/zfoo/protocol/collection/HashMapLongInt.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/protocol/src/main/java/com/zfoo/protocol/collection/HashMapLongInt.java b/protocol/src/main/java/com/zfoo/protocol/collection/HashMapLongInt.java index 0f109097..b596c3e3 100644 --- a/protocol/src/main/java/com/zfoo/protocol/collection/HashMapLongInt.java +++ b/protocol/src/main/java/com/zfoo/protocol/collection/HashMapLongInt.java @@ -74,13 +74,13 @@ public class HashMapLongInt implements Map { return size == 0; } - public boolean containsKeyPrimitive(int key) { + public boolean containsKeyPrimitive(long key) { return indexOf(key) >= 0; } @Override public boolean containsKey(Object key) { - return containsKeyPrimitive(ArrayUtils.intValue((Integer) key)); + return containsKeyPrimitive(ArrayUtils.longValue((Long) key)); } @Override