mirror of https://github.com/grpc/grpc-java.git
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:
parent
6f9b4e87e1
commit
bc3e4e9a85
|
|
@ -679,14 +679,14 @@ abstract class RetriableStream<ReqT> implements ClientStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
@CheckReturnValue
|
@CheckReturnValue
|
||||||
@GuardedBy("lock")
|
// GuardedBy RetriableStream.lock
|
||||||
State cancelled() {
|
State cancelled() {
|
||||||
return new State(buffer, drainedSubstreams, winningSubstream, true, passThrough);
|
return new State(buffer, drainedSubstreams, winningSubstream, true, passThrough);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** The given substream is drained. */
|
/** The given substream is drained. */
|
||||||
@CheckReturnValue
|
@CheckReturnValue
|
||||||
@GuardedBy("lock")
|
// GuardedBy RetriableStream.lock
|
||||||
State substreamDrained(Substream substream) {
|
State substreamDrained(Substream substream) {
|
||||||
checkState(!passThrough, "Already passThrough");
|
checkState(!passThrough, "Already passThrough");
|
||||||
|
|
||||||
|
|
@ -710,7 +710,7 @@ abstract class RetriableStream<ReqT> implements ClientStream {
|
||||||
|
|
||||||
/** The given substream is closed. */
|
/** The given substream is closed. */
|
||||||
@CheckReturnValue
|
@CheckReturnValue
|
||||||
@GuardedBy("lock")
|
// GuardedBy RetriableStream.lock
|
||||||
State substreamClosed(Substream substream) {
|
State substreamClosed(Substream substream) {
|
||||||
substream.closed = true;
|
substream.closed = true;
|
||||||
if (this.drainedSubstreams.contains(substream)) {
|
if (this.drainedSubstreams.contains(substream)) {
|
||||||
|
|
@ -723,7 +723,7 @@ abstract class RetriableStream<ReqT> implements ClientStream {
|
||||||
}
|
}
|
||||||
|
|
||||||
@CheckReturnValue
|
@CheckReturnValue
|
||||||
@GuardedBy("lock")
|
// GuardedBy RetriableStream.lock
|
||||||
State committed(Substream winningSubstream) {
|
State committed(Substream winningSubstream) {
|
||||||
checkState(this.winningSubstream == null, "Already committed");
|
checkState(this.winningSubstream == null, "Already committed");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue