This is an automated email from the ASF dual-hosted git repository. He-Pin pushed a commit to branch fix/countminsketch-redundant-cast in repository https://gitbox.apache.org/repos/asf/pekko.git
commit 697cd17ba7821215b9f7452defc2a1237e32c6a5 Author: 虎鸣 <[email protected]> AuthorDate: Tue Jun 23 11:12:33 2026 +0800 fix: remove redundant Float cast in CountMinSketch pattern match Motivation: CountMinSketch.java line 181 uses `(Float) o` cast inside an `instanceof Float f` pattern match, but `f` is already bound to the Float value. The cast is redundant. Modification: Use the pattern variable `f` directly instead of `(Float) o`. Result: Cleaner code, no functional change. Tests: sbt "remote/compile" — passed References: Refs #3136 --- .../java/org/apache/pekko/remote/artery/compress/CountMinSketch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/remote/src/main/java/org/apache/pekko/remote/artery/compress/CountMinSketch.java b/remote/src/main/java/org/apache/pekko/remote/artery/compress/CountMinSketch.java index c936770d2a..ed6c633794 100644 --- a/remote/src/main/java/org/apache/pekko/remote/artery/compress/CountMinSketch.java +++ b/remote/src/main/java/org/apache/pekko/remote/artery/compress/CountMinSketch.java @@ -178,7 +178,7 @@ public class CountMinSketch { return hashLong(Double.doubleToRawLongBits(d), 0); } if (o instanceof Float f) { - return hashLong(Float.floatToRawIntBits((Float) o), 0); + return hashLong(Float.floatToRawIntBits(f), 0); } if (o instanceof byte[] array) { return bytesHash(array, 0); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
