Skip to content

Commit e889b0b

Browse files
zhangskzcopybara-github
authored andcommitted
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
1 parent 339261f commit e889b0b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/core/src/main/java/com/google/protobuf/ExtensionRegistry.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ public ExtensionInfo findImmutableExtensionByName(final String fullName) {
126126
*
127127
* @return Information about the extension if found, or {@code null} otherwise.
128128
*/
129+
@Deprecated
129130
public ExtensionInfo findMutableExtensionByName(final String fullName) {
130131
return mutableExtensionsByName.get(fullName);
131132
}
@@ -152,6 +153,7 @@ public ExtensionInfo findImmutableExtensionByNumber(
152153
*
153154
* @return Information about the extension if found, or {@code null} otherwise.
154155
*/
156+
@Deprecated
155157
public ExtensionInfo findMutableExtensionByNumber(
156158
final Descriptor containingType, final int fieldNumber) {
157159
return mutableExtensionsByNumber.get(new DescriptorIntPair(containingType, fieldNumber));
@@ -163,6 +165,7 @@ public ExtensionInfo findMutableExtensionByNumber(
163165
*
164166
* @return Information about the extensions found, or {@code null} if there are none.
165167
*/
168+
@Deprecated
166169
public Set<ExtensionInfo> getAllMutableExtensionsByExtendedType(final String fullName) {
167170
HashSet<ExtensionInfo> extensions = new HashSet<ExtensionInfo>();
168171
for (DescriptorIntPair pair : mutableExtensionsByNumber.keySet()) {

0 commit comments

Comments
 (0)