Skip to content

Commit 1065775

Browse files
garrettjonesgooglemziccard
authored andcommitted
---
yaml --- r: 7311 b: refs/heads/tswast-patch-1 c: a884d58 h: refs/heads/master i: 7309: 96d9df5 7307: c0c7194 7303: 2ef68ad 7295: e63dafa
1 parent a485b78 commit 1065775

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 19da84d2492d6937ac640813312dd2d56ce0c1d5
60+
refs/heads/tswast-patch-1: a884d5812ec71d23e1303277b14919b24af103ba
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-gax/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
<artifactId>auto-value</artifactId>
2828
<version>1.1</version>
2929
</dependency>
30+
<dependency>
31+
<groupId>com.google.code.findbugs</groupId>
32+
<artifactId>jsr305</artifactId>
33+
<version>3.0.1</version>
34+
</dependency>
3035
<dependency>
3136
<groupId>junit</groupId>
3237
<artifactId>junit</artifactId>

branches/tswast-patch-1/gcloud-java-gax/src/main/java/io/gapi/gax/protobuf/PathTemplate.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.io.UnsupportedEncodingException;
1212
import java.net.URLDecoder;
1313
import java.net.URLEncoder;
14+
import java.nio.charset.StandardCharsets;
1415
import java.util.List;
1516
import java.util.ListIterator;
1617
import java.util.Map;
@@ -766,15 +767,15 @@ private static ImmutableList<Segment> parseTemplate(String template) {
766767

767768
private static String encodeUrl(String text) {
768769
try {
769-
return URLEncoder.encode(text, "UTF-8");
770+
return URLEncoder.encode(text, StandardCharsets.UTF_8.name());
770771
} catch (UnsupportedEncodingException e) {
771772
throw new ValidationException("UTF-8 encoding is not supported on this platform");
772773
}
773774
}
774775

775776
private static String decodeUrl(String url) {
776777
try {
777-
return URLDecoder.decode(url, "UTF-8");
778+
return URLDecoder.decode(url, StandardCharsets.UTF_8.name());
778779
} catch (UnsupportedEncodingException e) {
779780
throw new ValidationException("UTF-8 encoding is not supported on this platform");
780781
}

0 commit comments

Comments
 (0)