Deprecated unused/obsolete mutable APIs, to be removed in next breaking change.

These APIs were intended to support an internal-only mutable implementation of Java protobuf and should not actually be used in open source. Removal of these APIs shouldn't break anyone -- the equivalent immutable methods should be used instead.

PiperOrigin-RevId: 651833683
pull/17444/head
Sandy Zhang 7 months ago committed by Copybara-Service
parent 339261f58c
commit e889b0be54
  1. 3
      java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java

@ -126,6 +126,7 @@ public class ExtensionRegistry extends ExtensionRegistryLite {
*
* @return Information about the extension if found, or {@code null} otherwise.
*/
@Deprecated
public ExtensionInfo findMutableExtensionByName(final String fullName) {
return mutableExtensionsByName.get(fullName);
}
@ -152,6 +153,7 @@ public class ExtensionRegistry extends ExtensionRegistryLite {
*
* @return Information about the extension if found, or {@code null} otherwise.
*/
@Deprecated
public ExtensionInfo findMutableExtensionByNumber(
final Descriptor containingType, final int fieldNumber) {
return mutableExtensionsByNumber.get(new DescriptorIntPair(containingType, fieldNumber));
@ -163,6 +165,7 @@ public class ExtensionRegistry extends ExtensionRegistryLite {
*
* @return Information about the extensions found, or {@code null} if there are none.
*/
@Deprecated
public Set<ExtensionInfo> getAllMutableExtensionsByExtendedType(final String fullName) {
HashSet<ExtensionInfo> extensions = new HashSet<ExtensionInfo>();
for (DescriptorIntPair pair : mutableExtensionsByNumber.keySet()) {

Loading…
Cancel
Save