mirror of https://github.com/grpc/grpc-java.git
protobuf: Stabilize marshallerWithRecursionLimit (#11884)
This commit is contained in:
parent
44e92e2c2c
commit
90b1c4fe94
|
@ -89,12 +89,11 @@ public final class ProtoLiteUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance} and a
|
* 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.
|
* value as defined by the protobuf library.
|
||||||
*
|
*
|
||||||
* @since 1.56.0
|
* @since 1.56.0
|
||||||
*/
|
*/
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")
|
|
||||||
public static <T extends MessageLite> Marshaller<T> marshallerWithRecursionLimit(
|
public static <T extends MessageLite> Marshaller<T> marshallerWithRecursionLimit(
|
||||||
T defaultInstance, int recursionLimit) {
|
T defaultInstance, int recursionLimit) {
|
||||||
return new MessageMarshaller<>(defaultInstance, recursionLimit);
|
return new MessageMarshaller<>(defaultInstance, recursionLimit);
|
||||||
|
|
|
@ -18,7 +18,6 @@ package io.grpc.protobuf;
|
||||||
|
|
||||||
import com.google.protobuf.ExtensionRegistry;
|
import com.google.protobuf.ExtensionRegistry;
|
||||||
import com.google.protobuf.Message;
|
import com.google.protobuf.Message;
|
||||||
import io.grpc.ExperimentalApi;
|
|
||||||
import io.grpc.Metadata;
|
import io.grpc.Metadata;
|
||||||
import io.grpc.MethodDescriptor.Marshaller;
|
import io.grpc.MethodDescriptor.Marshaller;
|
||||||
import io.grpc.protobuf.lite.ProtoLiteUtils;
|
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
|
* 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.
|
* value as defined by the protobuf library.
|
||||||
*
|
*
|
||||||
* @since 1.56.0
|
* @since 1.56.0
|
||||||
*/
|
*/
|
||||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")
|
|
||||||
public static <T extends Message> Marshaller<T> marshallerWithRecursionLimit(T defaultInstance,
|
public static <T extends Message> Marshaller<T> marshallerWithRecursionLimit(T defaultInstance,
|
||||||
int recursionLimit) {
|
int recursionLimit) {
|
||||||
return ProtoLiteUtils.marshallerWithRecursionLimit(defaultInstance, recursionLimit);
|
return ProtoLiteUtils.marshallerWithRecursionLimit(defaultInstance, recursionLimit);
|
||||||
|
|
Loading…
Reference in New Issue