From 3ff077f5504ba13f982dea6e98644d6dff2128ee Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 2 Jan 2025 22:32:08 -0800 Subject: [PATCH] Fix Checkstyle and Modernizer warnings --- pom.xml | 9 ++++++--- src/main/java/org/gaul/s3proxy/Main.java | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index ba0ed5a4..c9bb0cfe 100644 --- a/pom.xml +++ b/pom.xml @@ -345,6 +345,9 @@ ${java.version} + + com/google/common/base/Supplier + @@ -395,9 +398,9 @@ - com.amazonaws - aws-java-sdk-sts - 1.12.261 + com.amazonaws + aws-java-sdk-sts + 1.12.261 args4j diff --git a/src/main/java/org/gaul/s3proxy/Main.java b/src/main/java/org/gaul/s3proxy/Main.java index 3aafd201..e6eb3ac4 100644 --- a/src/main/java/org/gaul/s3proxy/Main.java +++ b/src/main/java/org/gaul/s3proxy/Main.java @@ -40,11 +40,11 @@ import com.amazonaws.auth.AWSSessionCredentials; import com.amazonaws.auth.DefaultAWSCredentialsProviderChain; import com.google.common.base.Strings; +import com.google.common.base.Supplier; import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableMap; import com.google.common.io.MoreFiles; import com.google.common.util.concurrent.ThreadFactoryBuilder; -import com.google.common.base.Supplier; import org.jclouds.Constants; import org.jclouds.ContextBuilder; @@ -54,11 +54,11 @@ import org.jclouds.blobstore.BlobStoreContext; import org.jclouds.concurrent.DynamicExecutors; import org.jclouds.concurrent.config.ExecutorServiceModule; +import org.jclouds.domain.Credentials; import org.jclouds.location.reference.LocationConstants; import org.jclouds.logging.slf4j.config.SLF4JLoggingModule; import org.jclouds.openstack.swift.v1.blobstore.RegionScopedBlobStoreContext; import org.jclouds.s3.domain.ObjectMetadata.StorageClass; -import org.jclouds.domain.Credentials; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; import org.kohsuke.args4j.Option; @@ -392,7 +392,7 @@ private static BlobStore createBlobStore(Properties properties, } if ((identity.isEmpty() || credential.isEmpty()) && provider.equals("aws-s3")) { - Supplier credentialsSupplier = new Supplier() { + var credentialsSupplier = new Supplier() { @Override public Credentials get() { AWSCredentialsProvider authChain = DefaultAWSCredentialsProviderChain.getInstance();