Skip to content

Commit

Permalink
fix: Migrate off TextPrinter's deprecated methods (#1452)
Browse files Browse the repository at this point in the history
* fix: chore: Migrate off TextPrinter's deprecated methods

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
lqiu96 and gcf-owl-bot[bot] committed May 20, 2024
1 parent 15148f1 commit c3c1317
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public Object getNameOrId() {
/** Returns the key in an encoded form that can be used as part of a URL. */
public String toUrlSafe() {
try {
return URLEncoder.encode(TextFormat.printToString(toPb()), UTF_8.name());
return URLEncoder.encode(TextFormat.printer().printToString(toPb()), UTF_8.name());
} catch (UnsupportedEncodingException e) {
throw new IllegalStateException("Unexpected encoding exception", e);
}
Expand Down

0 comments on commit c3c1317

Please sign in to comment.