core: Remove incorrect `@GuardedBy` annotations

This change is being made in preparation for fixing a bug in the enforcement
of `@guardedby`.

Non-static inner classes can refer to locks declared by their enclosing
instances. Static member types (static classes, interfaces) cannot.
This commit is contained in:
ZHANG Dapeng 2018-02-08 14:29:59 -08:00 committed by GitHub
parent 6f9b4e87e1
commit bc3e4e9a85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -679,14 +679,14 @@ abstract class RetriableStream<ReqT> implements ClientStream {
}
@CheckReturnValue
@GuardedBy("lock")
// GuardedBy RetriableStream.lock
State cancelled() {
return new State(buffer, drainedSubstreams, winningSubstream, true, passThrough);
}
/** The given substream is drained. */
@CheckReturnValue
@GuardedBy("lock")
// GuardedBy RetriableStream.lock
State substreamDrained(Substream substream) {
checkState(!passThrough, "Already passThrough");
@ -710,7 +710,7 @@ abstract class RetriableStream<ReqT> implements ClientStream {
/** The given substream is closed. */
@CheckReturnValue
@GuardedBy("lock")
// GuardedBy RetriableStream.lock
State substreamClosed(Substream substream) {
substream.closed = true;
if (this.drainedSubstreams.contains(substream)) {
@ -723,7 +723,7 @@ abstract class RetriableStream<ReqT> implements ClientStream {
}
@CheckReturnValue
@GuardedBy("lock")
// GuardedBy RetriableStream.lock
State committed(Substream winningSubstream) {
checkState(this.winningSubstream == null, "Already committed");