Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Replace deprecated Patterns.IP_ADDRESS #21743

Closed
pocmo opened this issue Oct 6, 2021 · 2 comments
Closed

Replace deprecated Patterns.IP_ADDRESS #21743

pocmo opened this issue Oct 6, 2021 · 2 comments
Assignees
Labels
Android:12 Issues specific to Android 12 - API 31

Comments

@pocmo
Copy link
Contributor

pocmo commented Oct 6, 2021

Follow-up from: #21738

Patterns.IP_ADDRESS is deprecated in the Android 12 SDK.

Please use InetAddresses.isNumericAddress(String) instead.
Kept for backward compatibility reasons. It does not match IPv6 addresses.

In our case that may just be okay and we could just suppress indefinitely?

// impl via FFTV https://searchfox.org/mozilla-mobile/source/firefox-echo-show/app/src/main/java/org/mozilla/focus/utils/FormattedDomain.java#129
@Suppress("DEPRECATION")
fun String.isIpv4(): Boolean = Patterns.IP_ADDRESS.matcher(this).matches()

┆Issue is synchronized with this Jira Task

@pocmo pocmo added the Android:12 Issues specific to Android 12 - API 31 label Oct 6, 2021
@github-actions github-actions bot added the needs:triage Issue needs triage label Oct 6, 2021
@amedyne amedyne removed the needs:triage Issue needs triage label Oct 8, 2021
@mcarare mcarare self-assigned this Feb 17, 2022
mcarare added a commit to mcarare/fenix that referenced this issue Feb 25, 2022
@mcarare
Copy link
Contributor

mcarare commented Mar 1, 2022

Closed in #23859.

@mcarare mcarare closed this as completed Mar 1, 2022
@Amejia481
Copy link
Contributor

🎉 !

pedroldk pushed a commit to pedroldk/fenix that referenced this issue Mar 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android:12 Issues specific to Android 12 - API 31
Projects
None yet
Development

No branches or pull requests

4 participants