Merge "Fix Automated API Review: InetAddresses" am: 4daca39083
am: cd8d86ab93
Change-Id: Ibcef646f539b1a871d8521d7216ecb6f7df8c0fd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user