Skip to content

protobuf: Stabilize marshallerWithRecursionLimit #11884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,11 @@ public static <T extends MessageLite> Marshaller<T> marshaller(T defaultInstance

/**
* 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);
Expand Down
4 changes: 1 addition & 3 deletions protobuf/src/main/java/io/grpc/protobuf/ProtoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

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;
Expand Down Expand Up @@ -58,12 +57,11 @@ public static <T extends Message> Marshaller<T> marshaller(final T defaultInstan

/**
* 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);
Expand Down