protobuf: Stabilize marshallerWithRecursionLimit (#11884) · grpc/grpc-java@90b1c4f

File tree

2 files changed

lines changed

  • protobuf-lite/src/main/java/io/grpc/protobuf/lite

  • protobuf/src/main/java/io/grpc/protobuf

2 files changed

lines changed

Original file line numberDiff line numberDiff line change

@@ -89,12 +89,11 @@ public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance

8989
9090

/**

9191

* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance} and a

92-

* custom limit for the recursion depth. Any negative number will leave the limit to its default

92+

* custom limit for the recursion depth. Any negative number will leave the limit as its default

9393

* value as defined by the protobuf library.

9494

*

9595

* @since 1.56.0

9696

*/

97-

@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")

9897

public static <T extends MessageLite> Marshaller<T> marshallerWithRecursionLimit(

9998

T defaultInstance, int recursionLimit) {

10099

return new MessageMarshaller<>(defaultInstance, recursionLimit);

Original file line numberDiff line numberDiff line change

@@ -18,7 +18,6 @@

1818
1919

import com.google.protobuf.ExtensionRegistry;

2020

import com.google.protobuf.Message;

21-

import io.grpc.ExperimentalApi;

2221

import io.grpc.Metadata;

2322

import io.grpc.MethodDescriptor.Marshaller;

2423

import io.grpc.protobuf.lite.ProtoLiteUtils;

@@ -58,12 +57,11 @@ public static <T extends Message> Marshaller<T> marshaller(final T defaultInstan

5857
5958

/**

6059

* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance} and a

61-

* custom limit for the recursion depth. Any negative number will leave the limit to its default

60+

* custom limit for the recursion depth. Any negative number will leave the limit as its default

6261

* value as defined by the protobuf library.

6362

*

6463

* @since 1.56.0

6564

*/

66-

@ExperimentalApi("https://github.com/grpc/grpc-java/issues/10108")

6765

public static <T extends Message> Marshaller<T> marshallerWithRecursionLimit(T defaultInstance,

6866

int recursionLimit) {

6967

return ProtoLiteUtils.marshallerWithRecursionLimit(defaultInstance, recursionLimit);