summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2018-12-10 15:48:01 +0000
committerPaul Duffin <paulduffin@google.com>2018-12-17 16:08:32 +0000
commita4df237dd8a022d0bfc408de28d40df9c6354c52 (patch)
treebc5857ae3ef112b2e90ec61d2cdfa3ff3cce3e78 /annotations/generate_annotated_java_files.py
parentcb2a89a987dfeeacd1f6b3de3c1beeac265ff0a3 (diff)
Refactor InetAddress.parseNumericAddress/isNumeric
The parseNumericAddress and isNumeric methods in InetAddress are used by apps even though they are not part of the public API. The methods do more than one thing (parse numeric numbers, extract IPv6 addresses from inside URL hosts as described in RFC 2732, and provide access to loopback addresses) and so are not good candidates for exposing as is in the public API. Extracting IPv6 addresses is easy to do using standard Java, and the loopback addresses are already available through other InetAddress classes. So, this change extracts functionality for parsing numeric addresses out into a new InetAddressUtils class (with corresponding tests) that can be then be used as the basis for a public API. Tested by running: atest core-tests:libcore.java.net.InetAddressTest \ core-tests:libcore.libcore.net.InetAddressUtilsTest \ CtsNetTestCases:android.net.cts.InetAddressesTest Bug: 78686891 Test: as above Change-Id: Ie9eaf5356e1c573ea59dfbb41f9d23cfef14e82c
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions