fix: Base64 decoding to discard newline characters#1941
Merged
Conversation
eamonnmcmanus
suggested changes
May 15, 2024
eamonnmcmanus
left a comment
There was a problem hiding this comment.
LGTM, with just one very small thing.
| @Deprecated | ||
| public class Base64 { | ||
| // Special decoders that discards the new line character so that the behavior matches what | ||
| // we had with Apache Commmons Codec's decodeBase64. |
There was a problem hiding this comment.
I think it would be worth commenting on what the 64 means. (It doesn't mean very much, since it's only used for encoding and we don't do that.)
Member
Author
There was a problem hiding this comment.
Added explanation of the 2nd parameter of the withSeparator method.
google-http-client/src/main/java/com/google/api/client/util/Base64.java
Outdated
Show resolved
Hide resolved
diegomarquezp
approved these changes
May 16, 2024
google-http-client/src/test/java/com/google/api/client/util/Base64Test.java
Outdated
Show resolved
Hide resolved
eamonnmcmanus
approved these changes
May 16, 2024
eamonnmcmanus
left a comment
There was a problem hiding this comment.
Sorry for misunderstanding in my previous comment.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Using b/274482271#comment3 by @eamonnmcmanus
trim()method that was also added for the compatibility.