8000 Merege 1.18.0-rc-SNAPSHOT · DingaGa/google-http-java-client@cec3bf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit cec3bf7

Browse files
committed
Merege 1.18.0-rc-SNAPSHOT
2 parents ffcdcf5 + 21d2b9c commit cec3bf7

File tree

40 files changed

+4389
-242
lines changed

40 files changed

+4389
-242
lines changed

clirr-ignored-differences.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!-- see http://mojo.codehaus.org/clirr-maven-plugin/examples/ignored-differences.html -->
3+
34
<differences>
45
<!-- 8001 (Class removed): className -->
5-
<difference>
6-
<differenceType>8001</differenceType>
7-
<className>com/google/api/client/**/xml/**</className>
8-
</difference>
96
<difference>
107
<differenceType>8001</differenceType>
118
<className>com/google/api/client/repackaged/**</className>

google-http-client-android-test/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<groupId>google-http-client</groupId>
55
<artifactId>google-http-client-android-test</artifactId>
66
<name>Test project for google-http-client-android.</name>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<packaging>apk</packaging>
99

1010
<build>
@@ -86,7 +86,7 @@
8686
<dependency>
8787
<groupId>com.google.http-client</groupId>
8888
<artifactId>google-http-client-android</artifactId>
89-
<version>1.17.0-rc-SNAPSHOT</version>
89+
<version>1.18.0-rc-SNAPSHOT</version>
9090
<exclusions>
9191
<exclusion>
9292
<artifactId>android</artifactId>
@@ -105,7 +105,7 @@
105105
<dependency>
106106
<groupId>com.google.http-client</groupId>
107107
<artifactId>google-http-client-test</artifactId>
108-
<version>1.17.0-rc-SNAPSHOT</version>
108+
<version>1.18.0-rc-SNAPSHOT</version>
109109
<exclusions>
110110
<exclusion>
111111
<artifactId>junit</artifactId>

google-http-client-android/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-android</ar 10000 tifactId>

google-http-client-appengine/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-appengine</artifactId>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src=../libs-sources/google-http-client-jdo-${project.version}-sources.jar

google-http-client-assembly/dependencies/google-http-client-android-dependencies.html

Lines changed: 473 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-appengine-dependencies.html

Lines changed: 505 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-dependencies.html

Lines changed: 519 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-gson-dependencies.html

Lines changed: 430 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-jackson-dependencies.html

Lines changed: 430 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-jackson2-dependencies.html

Lines changed: 430 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-jdo-dependencies.html

Lines changed: 597 additions & 11 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-protobuf-dependencies.html

Lines changed: 375 additions & 10 deletions
Large diffs are not rendered by default.

google-http-client-assembly/dependencies/google-http-client-xml-dependencies.html

Lines changed: 468 additions & 73 deletions
Large diffs are not rendered by default.

google-http-client-assembly/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<groupId>com.google.http-client</groupId>

google-http-client-assembly/readme.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,23 @@ <h3>Dependencies for all Platforms</h3>
9595
<li>gson-${project.gson.version}.jar</li>
9696
</ul>
9797
</li>
98-
<li>google-http-client-jackson-${project.version}.jar (when using
99-
Jackson)
98+
<li>google-http-client-jackson2-${project.version}.jar (when using
99+
Jackson 2)
100+
<ul>
101+
<li>jackson-core-${project.jackson-core2.version}.jar</li>
102+
</ul>
103+
</li>
104+
<li>google-http-client-jackson-${project.version}.jar (for backwards
105+
compatability when using Jackson 1)
100106
<ul>
101107
<li>jackson-core-asl-${project.jackson-core-asl.version}.jar</li>
102108
</ul>
103109
</li>
104-
<li>google-http-client-jackson2-${project.version}.jar (when using
105-
Jackson 2)
110+
<li>google-http-client-jdo-${project.version}.jar (when using JDO)
106111
<ul>
107-
<li>jackson-core-${project.jackson-core2.version}.jar</li>
112+
<li>jdo2-api-${project.jdo2-api.version}.jar</li>
108113
</ul>
109114
</li>
110-
<li>jdo2-api-${project.jdo2-api.version}.jar (when using JDO)</li>
111115
<li>google-http-client-xml-${project.version}.jar (when using XML)
112116
<ul>
113117
<li>xpp3-${project.xpp3.version}.jar (when NOT on Android)</li>

google-http-client-findbugs/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-findbugs</artifactId>

google-http-client-gson/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-gson</artifactId>

google-http-client-jackson/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-jackson</artifactId>

google-http-client-jackson2/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-jackson2</artifactId>

google-http-client-jdo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-jdo</artifactId>

google-http-client-protobuf/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-protobuf</artifactId>

google-http-client-test/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-test</artifactId>

google-http-client-xml/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client-xml</artifactId>

google-http-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.google.http-client</groupId>
66
<artifactId>google-http-client-parent</artifactId>
7-
<version>1.17.0-rc-SNAPSHOT</version>
7+
<version>1.18.0-rc-SNAPSHOT</version>
88
<relativePath>../pom.xml</relativePath>
99
</parent>
1010
<artifactId>google-http-client</artifactId>

google-http-client/src/main/java/com/google/api/client/http/BackOffPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
*
2525
* @since 1.7
2626
* @author Ravi Mistry
27-
* @deprecated (scheduled to be removed in 1.17) Use {@link HttpBackOffUnsuccessfulResponseHandler}
27+
* @deprecated (scheduled to be removed in 1.18) Use {@link HttpBackOffUnsuccessfulResponseHandler}
2828
* instead.
2929
*/
3030
@Deprecated

google-http-client/src/main/java/com/google/api/client/http/ExponentialBackOffPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
*
7676
* @since 1.7
7777
* @author Ravi Mistry
78-
* @deprecated (scheduled to be removed in 1.17). Use {@link HttpBackOffUnsuccessfulResponseHandler}
78+
* @deprecated (scheduled to be removed in 1.18). Use {@link HttpBackOffUnsuccessfulResponseHandler}
7979
* with {@link ExponentialBackOff} instead.
8080
*/
8181
@Beta

google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public final class HttpRequest {
5050
*
5151
* @since 1.8
5252
*/
53-
public static final String VERSION = "1.17.0-rc-SNAPSHOT";
53+
public static final String VERSION = "1.18.0-rc-SNAPSHOT";
5454

5555
/**
5656
* User agent suffix for all requests.
@@ -301,7 +301,7 @@ public HttpRequest setEncoding(HttpEncoding encoding) {
301301
* Returns the {@link BackOffPolicy} to use between retry attempts or {@code null} for none.
302302
*
303303
* @since 1.7
304-
* @deprecated (scheduled to be removed in 1.17).
304+
* @deprecated (scheduled to be removed in 1.18).
305305
* {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new
306306
* {@link HttpBackOffUnsuccessfulResponseHandler} instead.
307307
*/
@@ -316,7 +316,7 @@ public BackOffPolicy getBackOffPolicy() {
316316
* Sets the {@link BackOffPolicy} to use between retry attempts or {@code null} for none.
317317
*
318318
* @since 1.7
319-
* @deprecated (scheduled to be removed in 1.17). Use
319+
* @deprecated (scheduled to be removed in 1.18). Use
320320
* {@link #setUnsuccessfulResponseHandler(HttpUnsuccessfulResponseHandler)} with a new
321321
* {@link HttpBackOffUnsuccessfulResponseHandler} instead.
322322
*/
@@ -736,7 +736,7 @@ public HttpRequest setThrowExceptionOnExecuteError(boolean throwExceptionOnExecu
736736
* {@link LowLevelHttpRequest#execute()}.
737737
*
738738
* @since 1.9
739-
* @deprecated (scheduled to be removed in 1.17) Use
739+
* @deprecated (scheduled to be removed in 1.18) Use
740740
* {@link #setIOExceptionHandler(HttpIOExceptionHandler)} instead.
741741
*/
742742
@Deprecated
@@ -755,7 +755,7 @@ public boolean getRetryOnExecuteIOException() {
755755
* </p>
756756
*
757757
* @since 1.9
758-
* @deprecated (scheduled to be removed in 1.17) Use
758+
* @deprecated (scheduled to be removed in 1.18) Use
759759
* {@link #setIOExceptionHandler(HttpIOExceptionHandler)} instead.
760760
*/
761761
@Deprecated
@@ -1102,6 +1102,12 @@ public Future<HttpResponse> executeAsync() {
11021102
* {@code "If-*"} request headers.
11031103
* </p>
11041104
*
1105+
* <p>
1106+
* Upgrade warning: When handling a status code of 303, {@link #handleRedirect(int, HttpHeaders)}
1107+
* now correctly removes any content from the body of the new request, as GET requests should not
1108+
* have content. It did not do this in prior version 1.16.
1109+
* </p>
1110+
*
11051111
* @return whether the redirect was successful
11061112
* @since 1.11
11071113
*/
741A
@@ -1114,6 +1120,8 @@ public boolean handleRedirect(int statusCode, HttpHeaders responseHeaders) {
11141120
// on 303 change method to GET
11151121
if (statusCode == HttpStatusCodes.STATUS_CODE_SEE_OTHER) {
11161122
setRequestMethod(HttpMethods.GET);
1123+
// GET requests do not support non-zero content length
1124+
setContent(null);
11171125
}
11181126
// remove Authorization and If-* headers
11191127
headers.setAuthorization((String) null);

google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,7 @@ public InputStream getContent() throws IOException {
7676
try {
7777
return connection.getInputStream();
7878
} catch (IOException ioe) {
79-
InputStream stream = connection.getErrorStream();
80-
// if the stream is not null then the error was set on the error stream, otherwise we should
81-
// just rethrow the I/O exception.
82-
if (stream == null) {
83-
throw ioe;
84-
}
85-
return stream;
79+
return connection.getErrorStream();
8680
}
8781
}
8882

0 commit comments

Comments
 (0)
0