Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14)

Issue 11472043: issue 235: Leak in NetHttpResponse (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by peleyal
Modified:
12 years, 3 months ago
Reviewers:
ngmiceli, yanivi
CC:
dhuo
Base URL:
https://code.google.com/p/google-http-java-client/
Visibility:
Public.

Description

issue 235: Leak in NetHttpResponse

Patch Set 1 #

Patch Set 2 : minor #

Total comments: 6

Patch Set 3 : Yanivi's review #

Patch Set 4 : Yanivi comments #

Total comments: 6

Patch Set 5 : minor #

Total comments: 1

Patch Set 6 : ngmiceli review #

Total comments: 3

Patch Set 7 : ngmiceli review #

Patch Set 8 : minor #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -5 lines) Patch
M findbugs-exclude.xml View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java View 1 2 3 4 5 2 chunks +26 lines, -4 lines 1 comment Download
M google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java View 1 2 3 4 5 6 3 chunks +33 lines, -0 lines 0 comments Download
M google-http-client/src/test/java/com/google/api/client/http/javanet/NetHttpResponseTest.java View 1 2 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 19
peleyal
12 years, 4 months ago (2013-07-17 19:59:20 UTC) #1
yanivi
https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode74 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:74: public InputStream getContent() throws IOException { write a unit ...
12 years, 4 months ago (2013-07-17 22:58:14 UTC) #2
peleyal
https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode74 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:74: public InputStream getContent() throws IOException { On 2013/07/17 22:58:15, ...
12 years, 4 months ago (2013-07-18 14:55:37 UTC) #3
yanivi
https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:76: return responseCode < 400 ? connection.getInputStream() : connection.getErrorStream(); On ...
12 years, 4 months ago (2013-07-18 17:17:21 UTC) #4
peleyal
https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/4001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:76: return responseCode < 400 ? connection.getInputStream() : connection.getErrorStream(); 1. ...
12 years, 4 months ago (2013-07-19 15:41:25 UTC) #5
yanivi
https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:76: HttpURLConnection connection = this.connection; while you are here, remove ...
12 years, 4 months ago (2013-07-22 12:32:44 UTC) #6
peleyal
https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode76 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:76: HttpURLConnection connection = this.connection; On 2013/07/22 12:32:44, yanivi wrote: ...
12 years, 4 months ago (2013-07-23 00:28:08 UTC) #7
yanivi
https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode80 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:80: return connection.getErrorStream(); On 2013/07/23 00:28:08, peleyal wrote: > where ...
12 years, 4 months ago (2013-07-23 02:01:27 UTC) #8
peleyal
The sdk implementation. I don't know where to find the android sources On Jul 22, ...
12 years, 4 months ago (2013-07-23 02:02:40 UTC) #9
yanivi
On 2013/07/23 02:02:40, peleyal wrote: > The sdk implementation. I don't know where to find ...
12 years, 4 months ago (2013-07-24 20:51:06 UTC) #10
yanivi
On 2013/07/24 20:51:06, yanivi wrote: > On 2013/07/23 02:02:40, peleyal wrote: > > The sdk ...
12 years, 3 months ago (2013-07-25 18:02:35 UTC) #11
peleyal
https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/14001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode80 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:80: return connection.getErrorStream(); That's the implementation I found of HttpURLConnectionImpl ...
12 years, 3 months ago (2013-07-29 09:41:24 UTC) #12
peleyal
ping... :)
12 years, 3 months ago (2013-08-02 21:39:36 UTC) #13
ngmiceli
The change looks good, but not being terribly familiar with the cause of the leak ...
12 years, 3 months ago (2013-08-05 14:02:34 UTC) #14
peleyal
I tested that code and it worked as expected with the storage sample. I didn't ...
12 years, 3 months ago (2013-08-05 14:55:55 UTC) #15
ngmiceli
LGTM Please fix the relevant findbugs and checkstyle errors before committing. https://codereview.appspot.com/11472043/diff/40001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java File google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java (right): ...
12 years, 3 months ago (2013-08-07 15:39:41 UTC) #16
peleyal
DONE. https://codereview.appspot.com/11472043/diff/40001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java File google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java (right): https://codereview.appspot.com/11472043/diff/40001/google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java#newcode56 google-http-client/src/main/java/com/google/api/client/testing/http/javanet/MockHttpURLConnection.java:56: public static byte[] INPUT_BUF = new byte[1]; On ...
12 years, 3 months ago (2013-08-07 19:08:29 UTC) #17
yanivi
https://codereview.appspot.com/11472043/diff/54001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java File google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java (right): https://codereview.appspot.com/11472043/diff/54001/google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java#newcode68 google-http-client/src/main/java/com/google/api/client/http/javanet/NetHttpResponse.java:68: * Upgrade warning: in prior version 1.15 {@link #getContent()} ...
12 years, 3 months ago (2013-08-07 21:40:20 UTC) #18
peleyal
12 years, 3 months ago (2013-08-08 20:51:04 UTC) #19
Message was sent while issue was closed.
I already pushed this change so I sent another CL for review (just the version
changes)

Thanks for notice that Yaniv,
Eyal
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b