aws-sdk-java icon indicating copy to clipboard operation
aws-sdk-java copied to clipboard

method not found: AnonymousAWSCredentials

Open huycse31501 opened this issue 1 year ago • 6 comments

Upcoming End-of-Support

  • [X] I acknowledge the upcoming end-of-support for AWS SDK for Java v1 was announced, and migration to AWS SDK for Java v2 is recommended.

Describe the bug

This file forgets to import AnonymousAWSCredentials as the beginning of the file, causing the error to popup

https://github.com/aws/aws-sdk-java/blob/master/aws-java-sdk-sts/src/main/java/com/amazonaws/auth/STSAssumeRoleWithWebIdentitySessionCredentialsProvider.java

Regression Issue

  • [ ] Select this option if this issue appears to be a regression.

Expected Behavior

No bugs

Current Behavior

Bugs (method not found)

Reproduction Steps

Just use the sdk on the file path and its gonna show

Possible Solution

Import the method at the beginning of the file

Additional Information/Context

No response

AWS Java SDK version used

AWS SDK for Java 1.12.771

JDK version used

17

Operating System and version

MAC OS

huycse31501 avatar Oct 09 '24 14:10 huycse31501

Hi @huycse31501 STSAssumeRoleWithWebIdentitySessionCredentialsProvider and AnonymousAWSCredentials are in the same package com.amazonaws.auth, so the import statement is not needed.

What's the actual issue you are running into? Can you provide the full stacktrace of the error and a repro code?

debora-ito avatar Oct 09 '24 17:10 debora-ito

Hi, its not there image

huycse31501 avatar Oct 09 '24 17:10 huycse31501

Ah yes we are also trying to standardize the aws-java-sdk-bundle version in our codebase, leaving no strictly version dependencies of other in it. But I just want to raise it so we could have a check here

huycse31501 avatar Oct 09 '24 17:10 huycse31501

They are in the same package, just not in the same SDK module. Java SDK v1 has split packages.

STSAssumeRoleWithWebIdentitySessionCredentialsProvider is in com.amazonaws:aws-java-sdk-sts, AnonymousAWSCredentials is in com.amazonaws:aws-java-sdk-core.

What's the actual issue you are running into? Can you provide the full stacktrace of the error and a repro code?

debora-ito avatar Oct 09 '24 18:10 debora-ito

It looks like this issue has not been active for more than five days. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please add a comment to prevent automatic closure, or if the issue is already closed please feel free to reopen it.

github-actions[bot] avatar Oct 19 '24 21:10 github-actions[bot]