From e59e8c62558d81bd3513f5c04369bb0fa766cac6 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 1 Mar 2019 13:52:25 +0000 Subject: [PATCH] Fix Automated API Review: InetAddresses Add @NonNull annotations as required by the automated review. Bug: 126702338 Test: make checkbuild Change-Id: I9057f06de8d7ea846af00d5cefa744d4206b4b63 --- core/java/android/net/InetAddresses.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/java/android/net/InetAddresses.java b/core/java/android/net/InetAddresses.java index 8e6c69a97e..01b795e456 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); } }