Skip to content
Open
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 @@ -77,6 +77,15 @@ public static void setExtensionRegistry(ExtensionRegistryLite newRegistry) {
globalRegistry = checkNotNull(newRegistry, "newRegistry");
}

/**
* Returns the global extension registry.
*
* @since 1.62.0
*/
public static ExtensionRegistryLite getExtensionRegistry() {
return globalRegistry;
}

/**
* Creates a {@link Marshaller} for protos of the same type as {@code defaultInstance}.
*
Expand Down
9 changes: 9 additions & 0 deletions protobuf/src/main/java/io/grpc/protobuf/ProtoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ public static void setExtensionRegistry(ExtensionRegistry registry) {
ProtoLiteUtils.setExtensionRegistry(registry);
}

/**
* Returns the global extension registry.
*
* @since 1.62.0
*/
public static ExtensionRegistry getExtensionRegistry() {
return (ExtensionRegistry) ProtoLiteUtils.getExtensionRegistry();
}

/**
* Create a {@link Marshaller} for protos of the same type as {@code defaultInstance}.
*
Expand Down
Loading