Skip to content

Decouple ExtensionRegistry from GeneratedMessage #11

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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 @@ -200,10 +200,11 @@ public void add(final Extension<?, ?> extension) {
add(newExtensionInfo(extension), extension.getExtensionType());
}

/** Add an extension from a generated file to the registry. */
public void add(final GeneratedMessage.GeneratedExtension<?, ?> extension) {
add((Extension<?, ?>) extension);
}
//This method should be deprecated and then removed.
// /** Add an extension from a generated file to the registry. */
// public void add(final GeneratedMessage.GeneratedExtension<?, ?> extension) {
// add((Extension<?, ?>) extension);
// }

static ExtensionInfo newExtensionInfo(final Extension<?, ?> extension) {
if (extension.getDescriptor().getJavaType() == FieldDescriptor.JavaType.MESSAGE) {
Expand Down