File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
core/src/main/java/io/grpc/internal Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -259,6 +259,15 @@ public void run() {
259259 return balancer ;
260260 }
261261
262+ // ErrorProne's GuardedByChecker can't figure out that the idleModeTimer is a nested instance of
263+ // this particular instance. It is worried about something like:
264+ // ManagedChannelImpl a = ...;
265+ // ManagedChannelImpl b = ...;
266+ // a.idleModeTimer = b.idleModeTimer;
267+ // a.cancelIdleTimer(); // access of b.idleModeTimer is guarded by a.lock, not b.lock
268+ //
269+ // _We_ know that isn't happening, so we suppress the warning.
270+ @ SuppressWarnings ("GuardedByChecker" )
262271 @ GuardedBy ("lock" )
263272 private void cancelIdleTimer () {
264273 if (idleModeTimerFuture != null ) {
Original file line number Diff line number Diff line change 7979public final class ServerImpl extends io .grpc .Server {
8080 private static final ServerStreamListener NOOP_LISTENER = new NoopListener ();
8181
82- /** Executor for application processing. */
82+ /** Executor for application processing. Safe to read after {@link #start()}. */
8383 private Executor executor ;
84- @ GuardedBy ("lock" ) private boolean usingSharedExecutor ;
84+ /** Safe to read after {@link #start()}. */
85+ private boolean usingSharedExecutor ;
8586 private final InternalHandlerRegistry registry ;
8687 private final HandlerRegistry fallbackRegistry ;
8788 @ GuardedBy ("lock" ) private boolean started ;
You can’t perform that action at this time.
0 commit comments