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
This commit is contained in:
Alan Stokes 2022-11-09 13:35:40 +00:00
parent f2175fa423
commit 36a58d96e6
1 changed files with 7 additions and 0 deletions

View File

@ -31,6 +31,13 @@ java_sdk_library {
// 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 {