Skip to content

Commit b1d8946

Browse files
cpwrightclaude
andcommitted
refactor: Replace Trove PrimeFinder with io.deephaven.hash.PrimeFinder
Swap gnu.trove.impl.PrimeFinder for io.deephaven.hash.PrimeFinder (from libs.deephaven.hash, already on the compile classpath of both Base and Util) in the four files that used it: Base/cache/KeyedObjectCache.java Base/cache/OpenAddressedCanonicalizationCache.java Util/datastructures/WeakIdentityHashSet.java Util/datastructures/hash/HashMapBase.java PrimeFinder.nextPrime(int) is the only API used and has identical semantics in both implementations, so this is a pure import swap. Existing user io.deephaven.engine.table.impl.by.HashedRunFinder already pulls from io.deephaven.hash.PrimeFinder; this commit brings the four remaining call sites into line. libs.trove is left in place on Base and Util because RetentionCache (Constants, TObjectIntCustomHashMap, IdentityHashingStrategy) and HashMapBase (TLongLongMap, TLongCollection, etc.) still reference other Trove types. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 533617c commit b1d8946

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

Base/src/main/java/io/deephaven/base/cache/KeyedObjectCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
package io.deephaven.base.cache;
55

66
import io.deephaven.base.MathUtil;
7-
import io.deephaven.hash.KeyedObjectKey;
87
import io.deephaven.base.verify.Require;
9-
import gnu.trove.impl.PrimeFinder;
8+
import io.deephaven.hash.KeyedObjectKey;
9+
import io.deephaven.hash.PrimeFinder;
1010
import org.jetbrains.annotations.Nullable;
1111

1212
import java.util.Random;

Base/src/main/java/io/deephaven/base/cache/OpenAddressedCanonicalizationCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import io.deephaven.base.verify.Assert;
77
import io.deephaven.base.verify.Require;
8-
import gnu.trove.impl.PrimeFinder;
8+
import io.deephaven.hash.PrimeFinder;
99
import org.jetbrains.annotations.NotNull;
1010

1111
import java.lang.ref.ReferenceQueue;

Util/src/main/java/io/deephaven/util/datastructures/WeakIdentityHashSet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
package io.deephaven.util.datastructures;
55

6-
import gnu.trove.impl.PrimeFinder;
6+
import io.deephaven.hash.PrimeFinder;
77
import org.jetbrains.annotations.NotNull;
88
import org.jetbrains.annotations.Nullable;
99

Util/src/main/java/io/deephaven/util/datastructures/hash/HashMapBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import io.deephaven.base.verify.Assert;
77
import gnu.trove.TLongCollection;
88
import gnu.trove.function.TLongFunction;
9-
import gnu.trove.impl.PrimeFinder;
109
import gnu.trove.iterator.TLongLongIterator;
10+
import io.deephaven.hash.PrimeFinder;
1111
import gnu.trove.map.TLongLongMap;
1212
import gnu.trove.procedure.TLongLongProcedure;
1313
import gnu.trove.procedure.TLongProcedure;

0 commit comments

Comments
 (0)