Skip to content

Commit

Permalink
Upgrade to modernizer-maven-plugin 3.1.0
Browse files Browse the repository at this point in the history
This improves local variable suppressions.
  • Loading branch information
gaul committed Jan 18, 2025
1 parent 2fd98d4 commit f82ac9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 7 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
<plugin>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-plugin</artifactId>
<version>3.0.0</version>
<version>${modernizer.version}</version>
<executions>
<execution>
<id>modernizer</id>
Expand All @@ -345,9 +345,6 @@
</executions>
<configuration>
<javaVersion>${java.version}</javaVersion>
<exclusions>
<exclusion>com/google/common/base/Supplier</exclusion>
</exclusions>
</configuration>
</plugin>
<plugin>
Expand All @@ -369,6 +366,7 @@
<java.version>11</java.version>
<jclouds.version>2.6.0</jclouds.version>
<jetty.version>11.0.24</jetty.version>
<modernizer.version>3.1.0</modernizer.version>
<slf4j.version>2.0.16</slf4j.version>
<shade.prefix>${project.groupId}.shaded</shade.prefix>
<surefire.version>3.2.5</surefire.version>
Expand Down Expand Up @@ -509,6 +507,11 @@
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.gaul</groupId>
<artifactId>modernizer-maven-annotations</artifactId>
<version>${modernizer.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/org/gaul/s3proxy/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.google.common.io.MoreFiles;
import com.google.common.util.concurrent.ThreadFactoryBuilder;

import org.gaul.modernizer_maven_annotations.SuppressModernizer;
import org.jclouds.Constants;
import org.jclouds.ContextBuilder;
import org.jclouds.JcloudsVersion;
Expand Down Expand Up @@ -392,7 +393,8 @@ private static BlobStore createBlobStore(Properties properties,
}

if ((identity.isEmpty() || credential.isEmpty()) && provider.equals("aws-s3")) {
var credentialsSupplier = new Supplier<Credentials>() {
@SuppressModernizer
Supplier<Credentials> credentialsSupplier = new Supplier<Credentials>() {
@Override
public Credentials get() {
AWSCredentialsProvider authChain = DefaultAWSCredentialsProviderChain.getInstance();
Expand Down

0 comments on commit f82ac9c

Please sign in to comment.