Ensure @GuardedBy errors are flagged
Make the relevant Error Prone checks errors rather than warnings, so
if they detect any inconsistency in our locking, we find out about it.
Bug: 258396046
Test: Introduce bug, see error
Change-Id: I2edffb24ad7bc9ea55975bd17b66f1e8233af3d2
diff --git a/javalib/Android.bp b/javalib/Android.bp
index 51dd381..cb03fa1 100644
--- a/javalib/Android.bp
+++ b/javalib/Android.bp
@@ -31,6 +31,13 @@
// android.sysprop.*, renamed by jarjar
"com.android.system.virtualmachine.sysprop",
],
+ errorprone: {
+ // We use @GuardedBy and we want a test failure if our locking isn't consistent with it.
+ enabled: true,
+ javacflags: [
+ "-Xep:GuardedBy:ERROR",
+ ],
+ },
}
prebuilt_apis {