diff options
| author | 2019-03-02 03:05:18 +0000 | |
|---|---|---|
| committer | 2019-03-02 03:05:18 +0000 | |
| commit | 4daca39083179e11d0ff26ff130d2d191639052f (patch) | |
| tree | ace00fbee91de7af3b160d143ac6f47e6137807b | |
| parent | 5bcbb149716b173e28655deca44968653e6155c4 (diff) | |
| parent | fe38d35ba7a78bd2a3ab7b89ddbfbe4af62a0619 (diff) | |
Merge "Fix Automated API Review: InetAddresses"
| -rwxr-xr-x | api/current.txt | 4 | ||||
| -rw-r--r-- | core/java/android/net/InetAddresses.java | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/api/current.txt b/api/current.txt index be38bbc2337d..a653a574cbe1 100755 --- a/api/current.txt +++ b/api/current.txt @@ -27249,8 +27249,8 @@ package android.net { } public class InetAddresses { - method public static boolean isNumericAddress(String); - method public static java.net.InetAddress parseNumericAddress(String); + method public static boolean isNumericAddress(@NonNull String); + method @NonNull public static java.net.InetAddress parseNumericAddress(@NonNull String); } public final class IpPrefix implements android.os.Parcelable { diff --git a/core/java/android/net/InetAddresses.java b/core/java/android/net/InetAddresses.java index 8e6c69a97edb..01b795e456fa 100644 --- a/core/java/android/net/InetAddresses.java +++ b/core/java/android/net/InetAddresses.java @@ -16,6 +16,8 @@ package android.net; +import android.annotation.NonNull; + import libcore.net.InetAddressUtils; import java.net.InetAddress; @@ -40,7 +42,7 @@ public class InetAddresses { * @param address the address to parse. * @return true if the supplied address is numeric, false otherwise. */ - public static boolean isNumericAddress(String address) { + public static boolean isNumericAddress(@NonNull String address) { return InetAddressUtils.isNumericAddress(address); } @@ -57,7 +59,7 @@ public class InetAddresses { * @return an {@link InetAddress} instance corresponding to the address. * @throws IllegalArgumentException if {@code address} is not a numeric address. */ - public static InetAddress parseNumericAddress(String address) { + public static @NonNull InetAddress parseNumericAddress(@NonNull String address) { return InetAddressUtils.parseNumericAddress(address); } } |