Skip to content

Commit

Permalink
Use IdentityMap instead of CuckooObjectMap in class resolver (#877)
Browse files Browse the repository at this point in the history
* Use IdentityMap instead of CuckooObjectMap in class resolver
  • Loading branch information
theigl authored Jan 25, 2022
1 parent b5d5443 commit 9241663
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/com/esotericsoftware/kryo/util/CuckooObjectMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
* depending on hash collisions. Load factors greater than 0.91 greatly increase the chances the map will have to rehash to the
* next higher POT size.
* @author Nathan Sweet */
@Deprecated
public class CuckooObjectMap<K, V> {
// primes for hash functions 2, 3, and 4
private static final int PRIME2 = 0xbe1f14b1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DefaultClassResolver implements ClassResolver {
protected Kryo kryo;

protected final IntMap<Registration> idToRegistration = new IntMap<>();
protected final CuckooObjectMap<Class, Registration> classToRegistration = new CuckooObjectMap<>();
protected final IdentityMap<Class, Registration> classToRegistration = new IdentityMap<>();

protected IdentityObjectIntMap<Class> classToNameId;
protected IntMap<Class> nameIdToClass;
Expand Down

0 comments on commit 9241663

Please sign in to comment.