]> source.dussan.org Git - jgit.git/commitdiff
[errorprone] Suppress UnnecessaryParentheses 69/204569/2
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 22 Sep 2023 12:30:11 +0000 (14:30 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 22 Sep 2023 21:31:28 +0000 (23:31 +0200)
for the sake of readability.

See https://errorprone.info/bugpattern/UnnecessaryParentheses

Change-Id: I8444db78c408d4e8bd71bf7e575b9af637900629

org.eclipse.jgit/src/org/eclipse/jgit/util/Base64.java
org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/UbcCheck.java

index 119c96e02e65d6107a2a4e37170a7018e4f068b9..48d1c50c7d5aa17d59995953395ca5cfd647f5b0 100644 (file)
@@ -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==
index cebdbee27a1fe7e6d7d2fceee57bb1dd69ed8e4b..91ee3cc9beaf443fcd78a2aeb77ebdb82dcce865 100644 (file)
@@ -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