Skip to content

Commit

Permalink
Java: Deprecate newExtensionWriter.
Browse files Browse the repository at this point in the history
New usages should use newExtensionSerializer, which can avoid allocations for
empty field sets.

PiperOrigin-RevId: 645044533
  • Loading branch information
mhansen authored and copybara-github committed Jun 20, 2024
1 parent 6b7e814 commit 7122ba1
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,14 @@ public void writeUntil(final int end, final CodedOutputStream output) throws IOE
}
}

// TODO: Remove, replace with newExtensionSerializer().
/**
* For compatibility with older gencode.
*
* <p> TODO Remove this in the next breaking release.
*
* @deprecated Use {@link newExtensionSerializer()} instead.
*/
@Deprecated
protected ExtensionWriter newExtensionWriter() {
return new ExtensionWriter(false);
}
Expand Down

0 comments on commit 7122ba1

Please sign in to comment.