Skip to content

Commit

Permalink
Make setOnReadyThreshold() a noop method instead of abstract. (#11044) (
Browse files Browse the repository at this point in the history
#11059)

Make setOnReadyThreshold() a noop method instead of abstract

Co-authored-by: Ran <ran-su@users.noreply.github.com>
  • Loading branch information
ejona86 and ran-su committed Apr 2, 2024
1 parent 385ebda commit 922bf5b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package io.grpc.stub;

import static com.google.common.base.Preconditions.checkArgument;

import io.grpc.ExperimentalApi;

/**
Expand Down Expand Up @@ -75,7 +77,9 @@ public abstract class ServerCallStreamObserver<RespT> extends CallStreamObserver
* positive integer.
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/11021")
public abstract void setOnReadyThreshold(int numBytes);
public void setOnReadyThreshold(int numBytes) {
checkArgument(numBytes > 0, "numBytes must be positive: %s", numBytes);
}

/**
* Sets the compression algorithm to use for the call. May only be called before sending any
Expand Down

0 comments on commit 922bf5b

Please sign in to comment.