You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "yangkun (JIRA)" <ji...@apache.org> on 2019/08/05 09:31:00 UTC

[jira] [Created] (KAFKA-8750) Utils#murmur2() method switch case block don't have break

yangkun created KAFKA-8750:
------------------------------

             Summary: Utils#murmur2() method switch case block don't have break
                 Key: KAFKA-8750
                 URL: https://issues.apache.org/jira/browse/KAFKA-8750
             Project: Kafka
          Issue Type: Bug
          Components: clients
            Reporter: yangkun


Utils#murmur2() is as following, switch case block don't have break.

 
{code:java}
public static int murmur2(final byte[] data) {
    ...

    switch (length % 4) {
        case 3:
            h ^= (data[(length & ~3) + 2] & 0xff) << 16;
            // no break
        case 2:
            h ^= (data[(length & ~3) + 1] & 0xff) << 8;
            // no break
        case 1:
            h ^= data[length & ~3] & 0xff;
            h *= m;
    }

   ...

    return h;
}
{code}
 

 



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)