From 882eb1867c5b493d7264203812634a47b4e29d91 Mon Sep 17 00:00:00 2001 From: Adam Vartanian Date: Fri, 1 Mar 2019 13:58:28 +0000 Subject: [PATCH] Add @Nullable to new method Add @Nullable to a newly-added method, as requested by API council. Bug: 126698875 Test: make Change-Id: I2e72ea457b5adaceea70d9908bb8e2cac2e0d963 --- api/current.txt | 2 +- core/java/android/net/http/SslCertificate.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index 84f209c4b89f4..ccbdfb8c26f83 100755 --- a/api/current.txt +++ b/api/current.txt @@ -27891,7 +27891,7 @@ package android.net.http { method public java.util.Date getValidNotAfterDate(); method @Deprecated public String getValidNotBefore(); method public java.util.Date getValidNotBeforeDate(); - method public java.security.cert.X509Certificate getX509Certificate(); + method @Nullable public java.security.cert.X509Certificate getX509Certificate(); method public static android.net.http.SslCertificate restoreState(android.os.Bundle); method public static android.os.Bundle saveState(android.net.http.SslCertificate); } diff --git a/core/java/android/net/http/SslCertificate.java b/core/java/android/net/http/SslCertificate.java index 6fcd6ebe148ab..01dd08f4ad9c8 100644 --- a/core/java/android/net/http/SslCertificate.java +++ b/core/java/android/net/http/SslCertificate.java @@ -16,6 +16,7 @@ package android.net.http; +import android.annotation.Nullable; import android.annotation.UnsupportedAppUsage; import android.content.Context; import android.os.Bundle; @@ -252,7 +253,7 @@ public class SslCertificate { * @return The {@code X509Certificate} used to create this {@code SslCertificate} or * {@code null} if no certificate was provided. */ - public X509Certificate getX509Certificate() { + public @Nullable X509Certificate getX509Certificate() { return mX509Certificate; }