From f528f7eaf3e2b79e6df02ec9b8c6369c95f718cb Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Mon, 23 Oct 2023 05:39:09 +0000 Subject: [PATCH] Temporarily disable nullaway plugin The nullaway plugin fails in errorprone build with stubs generated from the API signature files, although the nullability information between the from-text and from-source stubs are identical. Below is the failing error message: ``` packages/apps/Settings/src/com/android/settings/accessibility/AccessibilitySettingsContentObserver.java:54: error: An unhandled exception was thrown by the Error Prone static analysis plugin. contentResolver.registerContentObserver(uri, false, this); ^ Please report this at https://github.com/google/error-prone/issues/new and include the following: error-prone version: 2.15.0 BugPattern: NullAway Stack Trace: com.google.common.util.concurrent.UncheckedExecutionException: java.lang.RuntimeException: expected call to iterator(), instead saw null ``` The error message indicates that the nullaway plugin is throwing an uncaught exception. Given that the plugin has been recently introduced to the tree and is currently being only used by Settings, this change proposes to temporarily disable the plugin to unblock the from-text stub generation feature and re-enable the plugin once the issue is fixed. Test: m Settings Bug: 306242755 Bug: 304077181 Change-Id: I617d8f20ceeefb339b3c1f8cd03af94a8c37fd39 --- Android.bp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Android.bp b/Android.bp index a56cc1968dc..b598a1f7ce5 100644 --- a/Android.bp +++ b/Android.bp @@ -122,12 +122,13 @@ android_library { plugins: ["androidx.room_room-compiler-plugin"], - errorprone: { - extra_check_modules: ["//external/nullaway:nullaway_plugin"], - javacflags: [ - "-XepOpt:NullAway:AnnotatedPackages=com.android.settings", - ], - }, + // TODO: b/307330031 - Re-enable the nullaway plugin when the issue is fixed. + // errorprone: { + // extra_check_modules: ["//external/nullaway:nullaway_plugin"], + // javacflags: [ + // "-XepOpt:NullAway:AnnotatedPackages=com.android.settings", + // ], + // }, libs: [ "telephony-common",