diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-09-22 14:30:11 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-09-22 23:31:28 +0200 |
commit | ebdf71c1176ddbf81305d57296f97ee2e653be93 (patch) | |
tree | 646db647337c5a7472d3efe51680036787712088 | |
parent | 4cf246c9ab66cd815e76fe20c32502e5e5bb66f1 (diff) | |
download | jgit-ebdf71c1176ddbf81305d57296f97ee2e653be93.tar.gz jgit-ebdf71c1176ddbf81305d57296f97ee2e653be93.zip |
[errorprone] Suppress UnnecessaryParentheses
for the sake of readability.
See https://errorprone.info/bugpattern/UnnecessaryParentheses
Change-Id: I8444db78c408d4e8bd71bf7e575b9af637900629
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java | 2 | ||||
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java | 1 |
2 files changed, 3 insertions, 0 deletions
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 |