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

[LANG-1238] Add overloaded methods to StringUtils with Pattern argument #328

Closed
wants to merge 7 commits into from

Conversation

coms
Copy link
Contributor

@coms coms commented Apr 30, 2018

This PR adds the overloaded methods to StringUtils in order to work with precompiled regular expression Patterns.
https://issues.apache.org/jira/projects/LANG/issues/LANG-1238

@coveralls
Copy link

coveralls commented Apr 30, 2018

Coverage Status

Coverage remained the same at 95.233% when pulling d09b252 on coms:master into bd4066e on apache:master.

@coms coms changed the title [LANG-1238] Added overloaded methods for StringUtils with Pattern arg [LANG-1238] Add overloaded methods for StringUtils with Pattern argument Apr 30, 2018
@coms coms changed the title [LANG-1238] Add overloaded methods for StringUtils with Pattern argument [LANG-1238] Add overloaded methods to StringUtils with Pattern argument Apr 30, 2018
@garydgregory
Copy link
Member

Thank you for your patch.

IMO, we should stop overloading our already giant StringUtils class with RegEx versions of methods. We already have some confusion (my op.) with some "replace*" methods taking a plain String and others taking RegEx Strings. Why not have a new RegExUtils class where all String input are RegEx? We can then deprecate the few StringUtil methods that do take RegEx Strings.

Thoughts?

@coms
Copy link
Contributor Author

coms commented May 9, 2018

This refactoring looks like a good idea. Thanks for the suggestion.

@coms coms closed this May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants