From ebdf71c1176ddbf81305d57296f97ee2e653be93 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 22 Sep 2023 14:30:11 +0200 Subject: [PATCH] [errorprone] Suppress UnnecessaryParentheses for the sake of readability. See https://errorprone.info/bugpattern/UnnecessaryParentheses Change-Id: I8444db78c408d4e8bd71bf7e575b9af637900629 --- org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java | 2 ++ org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java | 1 + 2 files changed, 3 insertions(+) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java index 119c96e02e..48d1c50c7d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java @@ -96,6 +96,7 @@ public class Base64 { * @param destOffset * the index where output will be put */ + @SuppressWarnings("UnnecessaryParentheses") private static void encode3to4(byte[] source, int srcOffset, int numSigBytes, byte[] destination, int destOffset) { // We have to shift left 24 in order to flush out the 1's that appear @@ -201,6 +202,7 @@ public class Base64 { * the index where output will be put * @return the number of decoded bytes converted */ + @SuppressWarnings("UnnecessaryParentheses") private static int decode4to3(byte[] source, int srcOffset, byte[] destination, int destOffset) { // Example: Dk== diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java index cebdbee27a..91ee3cc9be 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java @@ -89,6 +89,7 @@ final class UbcCheck { private static final int DV_II_55_0_bit = 1 << 30; private static final int DV_II_56_0_bit = 1 << 31; + @SuppressWarnings("UnnecessaryParentheses") static int check(int[] w) { int mask = ~0; mask &= (((((w[44] ^ w[45]) >>> 29) & 1) - 1) | ~(DV_I_48_0_bit -- 2.39.5