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

Use standard JDK regex library instead of named-regexp library #380

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

norrisjeremy
Copy link
Contributor

Use standard JDK regex library instead of named-regexp library since Java 8+ is required and natively supports named capture groups.

Additionally, whilst I am not an Android developer, it would appear that named capture groups are also natively supported as of Android 8.0 (API level 26). And since this is also the first Android release to support Java 8 (which is now a requirement for 7.x versions of this library), I would assume that using the standard JDK regex library is safe there as well.

…Java 8+ is required and natively supports named capture groups.
@bbottema
Copy link
Owner

bbottema commented Feb 1, 2022

Relates to #343 and #352

@norrisjeremy
Copy link
Contributor Author

Oops, sorry, I should have searched through closed issues & PRs first.
However, since 7.x versions now have a Java 8+ runtime requirement, not sure what the purpose is of using the alternate named-regexp library is, since any Android release that supports Java 8+ runtime, also supports named capture groups?
Or perhaps I am misunderstanding?

@bbottema
Copy link
Owner

bbottema commented Feb 1, 2022

I was not aware of that actually, so if that's correct it can be removed again. But now I'm wondering if I should actually backport this change into a 6.x.x release.

@norrisjeremy
Copy link
Contributor Author

Yes, I suspect using the named-regexp library may be more useful for users running 6.x versions, since it presumably supports older Java runtimes and would be more likely to usable with older Android releases (at least, based upon my limited understanding of Android development).

@bbottema bbottema added this to the 7.1.1 milestone Feb 1, 2022
@bbottema bbottema added dependencies Pull requests that update a dependency file Priority-Low labels Feb 1, 2022
@bbottema bbottema merged commit ac08444 into bbottema:master Feb 1, 2022
@norrisjeremy norrisjeremy deleted the 20220201 branch July 26, 2024 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file Priority-Low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants