From 440824f7434e1e2c343b21a9ca3e6f405b8e0ea1 Mon Sep 17 00:00:00 2001 From: Nathan Harold Date: Tue, 7 Nov 2017 17:17:45 -0800 Subject: [PATCH] Fix signature for finalize() to resolve API Lint error The API linter on goog/master noticed that this method is listed in the public API even though it's protected. The change is probably related to a signature change from the internal finalize method which throws a Throwable. Fix the method in IpSecManager to throw Throwable, which should fix the current.txt and resolve the lint error. Bug: 69006767 Test: compilation, make update-api Change-Id: I173d014baaa505c365b7916fcb52f2a8b4af9373 --- api/current.txt | 1 - api/test-current.txt | 1 - core/java/android/net/IpSecManager.java | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/api/current.txt b/api/current.txt index eca65be473735..8ac44359c84df 100644 --- a/api/current.txt +++ b/api/current.txt @@ -25557,7 +25557,6 @@ package android.net { public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable { method public void close(); - method protected void finalize(); method public int getSpi(); } diff --git a/api/test-current.txt b/api/test-current.txt index 4163faf39c25e..26c910c3792a3 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -25667,7 +25667,6 @@ package android.net { public static final class IpSecManager.SecurityParameterIndex implements java.lang.AutoCloseable { method public void close(); - method protected void finalize(); method public int getSpi(); } diff --git a/core/java/android/net/IpSecManager.java b/core/java/android/net/IpSecManager.java index d7b325613fee1..eccd5f47f2ddd 100644 --- a/core/java/android/net/IpSecManager.java +++ b/core/java/android/net/IpSecManager.java @@ -136,7 +136,7 @@ public final class IpSecManager { } @Override - protected void finalize() { + protected void finalize() throws Throwable { if (mCloseGuard != null) { mCloseGuard.warnIfOpen(); }