-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DefaultRequest toString adds space between endpoint and resourcePath #2962
Comments
@SmarMykel thank you for reaching out. What is your use case? |
@debora-ito I use it as a A colleague of mine has told me maybe DefaultRequest wasn't intended to be used as SignableRequest but thats what I am using it for as of today |
Yes, as a good practice we don't recommend your code logic to rely on the String representation of an object. The toString method should be used in situations like logging and debugging. Closing as this is not a bug. Feel free to reach out if you have any other question. |
COMMENT VISIBILITY WARNINGComments on closed issues are hard for our team to see. |
Describe the bug
In aws-sdk-java/aws-java-sdk-core/src/main/java/com/amazonaws/DefaultRequest.java toString method does this. I have been trying to understand why this necessary but can't understand.
There a space appended after the
getEndpoint()
?.Specifically
builder.append(" ")
afterbuilder.append(getEndpoint())
If my endpoint is
Endpoint: https://api.example.com
andResource Path: /users/123
, then I will getGET https://api.example.com /users/123
with a space between the endpoint and resource pathExpected Behavior
DefaultRequest toString() returns for
Endpoint = https://api.example.com
Resource Path = /users/123
https://api.example.com/users/123 with no space between the endpoint and resource path
Current Behavior
DefaultRequest toString() returns for
Endpoint = https://api.example.com
Resource Path = /users/123
https://api.example.com /users/123 with a space between the endpoint and resource path
Reproduction Steps
Possible Solution
Additional Information/Context
No response
AWS Java SDK version used
2.20.47
JDK version used
openjdk 17.0.6 2023-01-17 LTS
Operating System and version
MacOS Ventura 13.3
The text was updated successfully, but these errors were encountered: