We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 15148f1 commit c3c1317Copy full SHA for c3c1317
google-cloud-datastore/src/main/java/com/google/cloud/datastore/Key.java
@@ -145,7 +145,7 @@ public Object getNameOrId() {
145
/** Returns the key in an encoded form that can be used as part of a URL. */
146
public String toUrlSafe() {
147
try {
148
- return URLEncoder.encode(TextFormat.printToString(toPb()), UTF_8.name());
+ return URLEncoder.encode(TextFormat.printer().printToString(toPb()), UTF_8.name());
149
} catch (UnsupportedEncodingException e) {
150
throw new IllegalStateException("Unexpected encoding exception", e);
151
}
0 commit comments