Skip to content

Commit cab839f

Browse files
authored
Upgrade gradle, it's dependencies and project dependencies (#1507)
Signed-off-by: Bala.FA <bala@minio.io>
1 parent d9c3d9b commit cab839f

File tree

6 files changed

+33
-16
lines changed

6 files changed

+33
-16
lines changed

adminapi/src/main/java/io/minio/admin/Crypto.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.bouncycastle.crypto.engines.AESEngine;
2626
import org.bouncycastle.crypto.generators.Argon2BytesGenerator;
2727
import org.bouncycastle.crypto.modes.GCMBlockCipher;
28+
import org.bouncycastle.crypto.modes.GCMModeCipher;
2829
import org.bouncycastle.crypto.params.AEADParameters;
2930
import org.bouncycastle.crypto.params.Argon2Parameters;
3031
import org.bouncycastle.crypto.params.KeyParameter;
@@ -83,7 +84,7 @@ private static byte[] generateKey(byte[] password, byte[] salt) {
8384
*/
8485
private static byte[] generateAdditionalData(byte[] key, byte[] paddedNonce)
8586
throws InvalidCipherTextException {
86-
GCMBlockCipher cipher = new GCMBlockCipher(new AESEngine());
87+
GCMModeCipher cipher = GCMBlockCipher.newInstance(AESEngine.newInstance());
8788
cipher.init(true, new AEADParameters(new KeyParameter(key), 128, paddedNonce));
8889
int outputLength = cipher.getMac().length;
8990
byte[] additionalData = new byte[outputLength];
@@ -132,7 +133,7 @@ public static byte[] encrypt(String password, byte[] data)
132133
/** Increment IV (nonce) by 1 as we used it for generating a tag for additional data. */
133134
paddedNonce[8] = 1;
134135

135-
GCMBlockCipher cipher = new GCMBlockCipher(new AESEngine());
136+
GCMModeCipher cipher = GCMBlockCipher.newInstance(AESEngine.newInstance());
136137
cipher.init(true, new AEADParameters(new KeyParameter(key), 128, paddedNonce, additionalData));
137138
int outputLength = cipher.getOutputSize(data.length);
138139
byte[] encryptedData = new byte[outputLength];
@@ -180,7 +181,7 @@ public static byte[] decrypt(String password, byte[] payload)
180181
/** Increment IV (nonce) by 1 as we used it for generating a tag for additional data. */
181182
paddedNonce[8] = 1;
182183

183-
GCMBlockCipher cipher = new GCMBlockCipher(new AESEngine());
184+
GCMModeCipher cipher = GCMBlockCipher.newInstance(AESEngine.newInstance());
184185
cipher.init(false, new AEADParameters(new KeyParameter(key), 128, paddedNonce, additionalData));
185186
int outputLength = cipher.getOutputSize(encryptedData.length);
186187
byte[] decryptedData = new byte[outputLength];

api/src/main/java/io/minio/credentials/MinioClientConfigProvider.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ public Credentials fetch() {
111111
}
112112
}
113113

114+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(
115+
value = {"UwF", "UuF"},
116+
justification = "All the fields are written at the time of JSON unmarshalling.")
114117
public static class McConfig {
115118
private Map<String, Map<String, String>> hosts;
116119

api/src/main/java/io/minio/messages/ObjectLockConfiguration.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
*/
3030
@Root(name = "ObjectLockConfiguration", strict = false)
3131
@Namespace(reference = "http://s3.amazonaws.com/doc/2006-03-01/")
32+
@edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "URF_UNREAD_FIELD")
3233
public class ObjectLockConfiguration {
3334
@Element(name = "ObjectLockEnabled")
3435
private String objectLockEnabled = "Enabled";

build.gradle

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616

1717
/*****************************/
18-
/* gradleVersion = '8.1.1' */
18+
/* gradleVersion = '8.4' */
1919
/*****************************/
2020

2121
plugins {
22-
id "com.github.johnrengelman.shadow" version "7.1.2"
23-
id "com.github.spotbugs" version "5.0.14"
22+
id "com.github.johnrengelman.shadow" version "8.1.1"
23+
id "com.github.spotbugs" version "5.2.1"
2424
id "io.codearte.nexus-staging" version "0.30.0"
2525
id "de.marcphilipp.nexus-publish" version "0.4.0"
2626
id "com.diffplug.spotless" version "6.13.0"
@@ -52,15 +52,15 @@ subprojects {
5252

5353
dependencies {
5454
api "com.carrotsearch.thirdparty:simple-xml-safe:2.7.1"
55-
api "com.google.guava:guava:32.0.1-jre"
55+
api "com.google.guava:guava:32.1.3-jre"
5656
api "com.squareup.okhttp3:okhttp:4.12.0"
57-
api "com.fasterxml.jackson.core:jackson-annotations:2.15.2"
58-
api "com.fasterxml.jackson.core:jackson-core:2.15.2"
59-
api "com.fasterxml.jackson.core:jackson-databind:2.15.2"
60-
api 'org.bouncycastle:bcprov-jdk18on:1.74'
61-
api 'org.apache.commons:commons-compress:1.24.0'
62-
api "org.xerial.snappy:snappy-java:1.1.10.1"
63-
compileOnly "com.github.spotbugs:spotbugs-annotations:4.7.3"
57+
api "com.fasterxml.jackson.core:jackson-annotations:2.15.3"
58+
api "com.fasterxml.jackson.core:jackson-core:2.15.3"
59+
api "com.fasterxml.jackson.core:jackson-databind:2.15.3"
60+
api "org.bouncycastle:bcprov-jdk18on:1.76"
61+
api "org.apache.commons:commons-compress:1.24.0"
62+
api "org.xerial.snappy:snappy-java:1.1.10.5"
63+
compileOnly "com.github.spotbugs:spotbugs-annotations:4.8.0"
6464

6565
testImplementation "com.squareup.okhttp3:mockwebserver:4.12.0"
6666
testImplementation "junit:junit:4.13.2"
@@ -242,7 +242,7 @@ project(':adminapi') {
242242

243243
dependencies {
244244
api project(':api')
245-
api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.2"
245+
api "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.3"
246246
testImplementation project(':api')
247247
}
248248

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
44
networkTimeout=10000
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists

spotbugs-filter.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,16 @@
2020
<Match>
2121
<Bug pattern="EI_EXPOSE_REP2"/>
2222
</Match>
23+
<!-- False positive in many cases: minio-java does not shadow the publicly available identifier from the Java Standard Library by packaging them under io.minio. -->
24+
<Match>
25+
<Bug pattern="PI_DO_NOT_REUSE_PUBLIC_IDENTIFIERS_CLASS_NAMES"/>
26+
</Match>
27+
<!-- False positive in many cases: Classes cannot be final in reported classes and deprecated finalize() cannot be used. -->
28+
<Match>
29+
<Bug pattern="CT_CONSTRUCTOR_THROW"/>
30+
</Match>
31+
<!-- False positive: Method invocation is legit. -->
32+
<Match>
33+
<Bug pattern="DMI_DOH"/>
34+
</Match>
2335
</FindBugsFilter>

0 commit comments

Comments
 (0)