Skip to content

Commit c3c1317

Browse files
fix: Migrate off TextPrinter's deprecated methods (#1452)
* 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>
1 parent 15148f1 commit c3c1317

File tree

1 file changed

+1
-1
lines changed
  • google-cloud-datastore/src/main/java/com/google/cloud/datastore

1 file changed

+1
-1
lines changed

google-cloud-datastore/src/main/java/com/google/cloud/datastore/Key.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public Object getNameOrId() {
145145
/** Returns the key in an encoded form that can be used as part of a URL. */
146146
public String toUrlSafe() {
147147
try {
148-
return URLEncoder.encode(TextFormat.printToString(toPb()), UTF_8.name());
148+
return URLEncoder.encode(TextFormat.printer().printToString(toPb()), UTF_8.name());
149149
} catch (UnsupportedEncodingException e) {
150150
throw new IllegalStateException("Unexpected encoding exception", e);
151151
}

0 commit comments

Comments
 (0)