protobuf: Stabilize marshallerWithRecursionLimit (#11884)

This commit is contained in:
MV Shiva 2025-02-07 14:16:13 +05:30 committed by GitHub
parent 44e92e2c2c
commit 90b1c4fe94
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 5 deletions

View File

@ -89,12 +89,11 @@ public final class ProtoLiteUtils {
/**
* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance} and a
* custom limit for the recursion depth. Any negative number will leave the limit to its default
* custom limit for the recursion depth. Any negative number will leave the limit as its default
* value as defined by the protobuf library.
*
* @since 1.56.0
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")
public static <T extends MessageLite> Marshaller<T> marshallerWithRecursionLimit(
T defaultInstance, int recursionLimit) {
return new MessageMarshaller<>(defaultInstance, recursionLimit);

View File

@ -18,7 +18,6 @@ package io.grpc.protobuf;
import com.google.protobuf.ExtensionRegistry;
import com.google.protobuf.Message;
import io.grpc.ExperimentalApi;
import io.grpc.Metadata;
import io.grpc.MethodDescriptor.Marshaller;
import io.grpc.protobuf.lite.ProtoLiteUtils;
@ -58,12 +57,11 @@ public final class ProtoUtils {
/**
* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance} and a
* custom limit for the recursion depth. Any negative number will leave the limit to its default
* custom limit for the recursion depth. Any negative number will leave the limit as its default
* value as defined by the protobuf library.
*
* @since 1.56.0
*/
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")
public static <T extends Message> Marshaller<T> marshallerWithRecursionLimit(T defaultInstance,
int recursionLimit) {
return ProtoLiteUtils.marshallerWithRecursionLimit(defaultInstance, recursionLimit);