From 0541a04273c8a2695d574c1159fc0127777ff9f5 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Fri, 7 May 2021 10:10:38 +0100 Subject: [PATCH] Remove @GuardedBy on a final, immutable field Remove @GuardedBy on a final, immutable field as it is causing errorprone warnings on a work-in-progress commit. ContentProviderHolder.mUri is accessed in multiple places without holding mLock, and it is final and documented as immutable so should be safe to access without mLock. This commit should reduce ErrorProne warnings now and in future. Bug: 185786624 Test: build / treehugger only Change-Id: Ic7fbe550ff6f538f336cfb859f66daa94844ca28 --- core/java/android/provider/Settings.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java index c8e5e4275e74f..c51c506854025 100644 --- a/core/java/android/provider/Settings.java +++ b/core/java/android/provider/Settings.java @@ -2660,7 +2660,6 @@ public final class Settings { private static final class ContentProviderHolder { private final Object mLock = new Object(); - @GuardedBy("mLock") private final Uri mUri; @GuardedBy("mLock") @UnsupportedAppUsage