Skip to content

Commit

Permalink
Deprecated unused/obsolete mutable APIs, to be removed in next breaki…
Browse files Browse the repository at this point in the history
…ng 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
zhangskz authored and copybara-github committed Jul 12, 2024
1 parent 339261f commit e889b0b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -126,6 +126,7 @@ public ExtensionInfo findImmutableExtensionByName(final String fullName) {
*
* @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 ExtensionInfo findImmutableExtensionByNumber(
*
* @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 ExtensionInfo findMutableExtensionByNumber(
*
* @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()) {

0 comments on commit e889b0b

Please sign in to comment.