Skip to content
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

support for Base64.getDecoder().decode(String) #826

Merged
merged 5 commits into from
Oct 22, 2023
Merged

support for Base64.getDecoder().decode(String) #826

merged 5 commits into from
Oct 22, 2023

Conversation

jgaleotti
Copy link
Collaborator

No description provided.

@jgaleotti jgaleotti requested a review from arcuri82 October 18, 2023 12:29
return Base64.Decoder.class;
}

private final static String BASE64_REGEX = "^[A-Za-z0-9+/]+={0,2}$";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is coming from somewhere, best to put a link here as well

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a better regex for this. I am also adding the link to the source.


import static org.junit.jupiter.api.Assertions.*;

public class Base64DecoderClassReplacementTest {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good to have a simple E2E as well.

for example, i think this will not work right now, as it is not registered on ReplacementList

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I was just checking with EMB why the error message kept happening.
I will add the e2e test too.
Thxs!

@jgaleotti jgaleotti requested a review from arcuri82 October 19, 2023 15:09
@@ -68,7 +68,8 @@ public static List<MethodReplacementClass> getList() {
new URLClassReplacement(),
new UUIDClassReplacement(),
new ValidatorClassReplacement(),
new WebRequestClassReplacement()
new WebRequestClassReplacement(),
new Base64DecoderClassReplacement()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list should be kept in alphabetic order

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@jgaleotti jgaleotti requested a review from arcuri82 October 20, 2023 23:02
@arcuri82 arcuri82 merged commit 9ba39b2 into master Oct 22, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants