-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix for upstream/#116 #118
Conversation
Hmm, Fun fact, S3 URIs aren't strictly speaking URIs because they can contain characters that are illegal in URIs. For example in an S3 bucket you can create "file with spaces.txt" All of these will be unique files and their respective URIs are: s3://bucket/file with spaces.txt And S3 will not consider these to be the same URI (which is fun) As you have spotted, implementations of the I need to add a note into the |
@@ -612,10 +615,32 @@ private boolean isEmpty(){ | |||
*/ | |||
@Override | |||
public URI toUri() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a note in the Java doc how this URI might not be equal to the "S3 URI" that will be seen in the S3 console due to the need for the URI to be encoded to avoid illegal characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. If you can add a note to the JavaDocs about how true URIs and S3 URIs might differ then we can merge this.
Having a similar note in the README.md would also be great.
ah interesting. we need to think a little bit more then. Paths.get(URI.create("s3://bucket/file with space")); breaks because URI.create() fails. We need to figure out then how Paths.get(uri) translates into a S3Path object and make sure it works if the urls is encoded. |
I amended the javadoc, @markjschreiber does it work?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! Thanks for the contribution
* fix for upstream/awslabs#116 * improved javadoc --------- Co-authored-by: sterapido <[email protected]>
Issue
#116
Description of changes:
Fix for #116
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.