This is an automated email from the ASF dual-hosted git repository.
szetszwo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ratis.git
The following commit(s) were added to refs/heads/master by this push:
new 894403557 RATIS-1649. Fix SF_SWITCH_NO_DEFAULT in PureJavaCrc32C.
(#991)
894403557 is described below
commit 894403557c776649a8eea2b6f39e987c5c748636
Author: Nandakumar Vadivelu <[email protected]>
AuthorDate: Wed Dec 13 21:45:49 2023 +0530
RATIS-1649. Fix SF_SWITCH_NO_DEFAULT in PureJavaCrc32C. (#991)
---
ratis-common/src/main/java/org/apache/ratis/util/PureJavaCrc32C.java | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git
a/ratis-common/src/main/java/org/apache/ratis/util/PureJavaCrc32C.java
b/ratis-common/src/main/java/org/apache/ratis/util/PureJavaCrc32C.java
index bdb000290..26345fbec 100644
--- a/ratis-common/src/main/java/org/apache/ratis/util/PureJavaCrc32C.java
+++ b/ratis-common/src/main/java/org/apache/ratis/util/PureJavaCrc32C.java
@@ -20,8 +20,6 @@
*/
package org.apache.ratis.util;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.zip.Checksum;
@@ -53,7 +51,6 @@ public class PureJavaCrc32C implements Checksum {
}
@Override
- @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT")
public void update(byte[] b, int off, int len) {
int localCrc = crc;
@@ -86,6 +83,7 @@ public class PureJavaCrc32C implements Checksum {
case 3: localCrc = (localCrc >>> 8) ^ T[T8_0_START + ((localCrc ^
b[off++]) & 0xff)];
case 2: localCrc = (localCrc >>> 8) ^ T[T8_0_START + ((localCrc ^
b[off++]) & 0xff)];
case 1: localCrc = (localCrc >>> 8) ^ T[T8_0_START + ((localCrc ^
b[off++]) & 0xff)];
+ break;
default:
/* nothing */
}
@@ -93,7 +91,6 @@ public class PureJavaCrc32C implements Checksum {
crc = localCrc;
}
- @SuppressFBWarnings("SF_SWITCH_NO_DEFAULT")
public void update(ByteBuffer b) {
int localCrc = crc;