You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by he...@apache.org on 2026/06/23 03:12:47 UTC

(pekko) branch fix/countminsketch-redundant-cast created (now 697cd17ba7)

This is an automated email from the ASF dual-hosted git repository.

He-Pin pushed a change to branch fix/countminsketch-redundant-cast
in repository https://gitbox.apache.org/repos/asf/pekko.git


      at 697cd17ba7 fix: remove redundant Float cast in CountMinSketch pattern match

This branch includes the following new commits:

     new 697cd17ba7 fix: remove redundant Float cast in CountMinSketch pattern match

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org


(pekko) 01/01: fix: remove redundant Float cast in CountMinSketch pattern match

Posted by he...@apache.org.
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: 虎鸣 <he...@alibaba-inc.com>
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: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org