This is an automated email from the ASF dual-hosted git repository. mbenson pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ant-antlibs-s3.git
The following commit(s) were added to refs/heads/main by this push: new c23d0da dump unused code c23d0da is described below commit c23d0da6b110e8d35cf0f7751d73b31d1f90460d Author: Matt Benson <mben...@apache.org> AuthorDate: Thu Mar 31 10:49:59 2022 -0500 dump unused code --- .../CredentialsConfiguringSuppliersProvider.java | 60 ---------------------- 1 file changed, 60 deletions(-) diff --git a/src/main/org/apache/ant/s3/credentials/CredentialsConfiguringSuppliersProvider.java b/src/main/org/apache/ant/s3/credentials/CredentialsConfiguringSuppliersProvider.java index 701edc8..79cb0a6 100644 --- a/src/main/org/apache/ant/s3/credentials/CredentialsConfiguringSuppliersProvider.java +++ b/src/main/org/apache/ant/s3/credentials/CredentialsConfiguringSuppliersProvider.java @@ -30,7 +30,6 @@ import org.apache.ant.s3.build.spi.ConfiguringSuppliersProvider; import org.apache.ant.s3.strings.ClassNames; import org.apache.ant.s3.strings.ClassNames.Direction; import org.apache.ant.s3.strings.PackageNames; -import org.apache.commons.lang3.ClassUtils; import org.apache.commons.lang3.StringUtils; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; @@ -44,7 +43,6 @@ import software.amazon.awssdk.auth.credentials.AwsCredentialsProviderChain; import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider; import software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider; import software.amazon.awssdk.auth.credentials.ProcessCredentialsProvider; -import software.amazon.awssdk.auth.credentials.ProfileCredentialsProviderFactory; import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; import software.amazon.awssdk.auth.credentials.SystemPropertyCredentialsProvider; import software.amazon.awssdk.auth.credentials.internal.LazyAwsCredentialsProvider; @@ -257,18 +255,6 @@ public class CredentialsConfiguringSuppliersProvider extends ConfiguringSupplier } /** - * Classname of only known implementation of - * {@link ProfileCredentialsProviderFactory}. - */ - public static final String SSO_CPF_CLASSNAME = - "software.amazon.awssdk.services.sso.auth.SsoProfileCredentialsProviderFactory"; - - /** - * Package name of AWS services package. - */ - public static final String SERVICES_PACKAGE = "software.amazon.awssdk.services"; - - /** * Produce a {@link ConfiguringSupplier} of {@link AwsCredentialsProvider}. * This is a {@link MetaBuilderByType} configured to search for * {@link AwsCredentialsProvider} types given an {@code @impl} "fragment" @@ -298,52 +284,6 @@ public class CredentialsConfiguringSuppliersProvider extends ConfiguringSupplier } /** - * Produce a {@link ConfiguringSupplier} of - * {@link ProfileCredentialsProviderFactory}. This is a - * {@link MetaBuilderByType} configured to search for - * {@link ProfileCredentialsProviderFactory} types given an {@code @impl} - * "fragment" that is: - * <ul> - * <li>Tested as a FQ classname</li> - * <li>Plugged into a matrix of: packages - * <ul> - * <li>Package of {@link ProfileCredentialsProviderFactory}</li> - * <li>Package of {@link #SSO_CPF_CLASSNAME} (if class present on classpath; - * prioritizes {@code sso} as explicit impl key)</li> - * <li>{@link #SERVICES_PACKAGE} ({@value #SERVICES_PACKAGE})</li> - * <li>1-2 ancestors of {@link ProfileCredentialsProviderFactory}</li> - * </ul> - * X classname suffixes as segments of - * {@link ProfileCredentialsProviderFactory}, successively trimmed from the - * LHS.</li> - * <li>If unspecified, defaulted to {@link #SSO_CPF_CLASSNAME} if present on - * classpath</li> - * </ul> - * - * @param project - * Ant {@link Project} - * @return {@link MetaBuilderByType} of - * {@link ProfileCredentialsProviderFactory} - */ - public MetaBuilderByType<ProfileCredentialsProviderFactory> profileCredentialsProviderFactoryConfiguringSupplier( - Project project) { - final PackageNames pcpf = PackageNames.of(ProfileCredentialsProviderFactory.class); - PackageNames packageNames = pcpf; - - Class<? extends ProfileCredentialsProviderFactory> defaultImpl; - try { - defaultImpl = ClassUtils.getClass(SSO_CPF_CLASSNAME).asSubclass(ProfileCredentialsProviderFactory.class); - packageNames = PackageNames.of(defaultImpl).andThen(packageNames); - } catch (ClassNotFoundException e) { - defaultImpl = null; - } - packageNames = packageNames.andThen(PackageNames.of(SERVICES_PACKAGE)).andThen(pcpf.ancestors(1, 2)); - - return new MetaBuilderByType<>(project, ProfileCredentialsProviderFactory.class, new ClassFinder(packageNames, - ClassNames.of(ProfileCredentialsProviderFactory.class).segments(Direction.FROM_LEFT)), defaultImpl); - } - - /** * Produce a {@link ConfiguringSupplier} for * {@link StaticCredentialsProvider}. *