-
Notifications
You must be signed in to change notification settings - Fork 13
Logic to catch multiple forbidden chars #32
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
Conversation
} | ||
|
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.
i like this change :). Makes the code more concise. Does it do anything different compared to the old functionality? i cant seem to spot the difference
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.
nvm found the diff. good spot on using replace
instead of replaceAll
. very subtle bug 😅
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.
The replaceall
confused me too. From what I understand, the main difference is supplying a regex pattern which does not seem necessary for the simple transformations we're doing.
@@ -169,6 +169,18 @@ public void makeKeyWithDot() { | |||
verify(firebase).logEvent(eq("test_event"), bundleEq(new Bundle())); | |||
} | |||
|
|||
@Test |
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.
🙌
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.
LGTM
Currently an evnet name like
test-event-dashed-and.dotted
will not be fully transformed to underscores which results in the event being rejected.Using replace instead of the replaceAll for the whitespace check. Not sure if I am missing something form the original implementation for that.