From d785096a2c7f8fda2dadf0f664791c1188a94b19 Mon Sep 17 00:00:00 2001 From: blakeli Date: Mon, 7 Apr 2025 19:47:21 -0400 Subject: [PATCH] Decouple ExtensionRegistry from GeneratedMessage --- .../main/java/com/google/protobuf/ExtensionRegistry.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/protobuf-api/src/main/java/com/google/protobuf/ExtensionRegistry.java b/protobuf-api/src/main/java/com/google/protobuf/ExtensionRegistry.java index 39babd3..665eee4 100644 --- a/protobuf-api/src/main/java/com/google/protobuf/ExtensionRegistry.java +++ b/protobuf-api/src/main/java/com/google/protobuf/ExtensionRegistry.java @@ -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) {