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

Issue 5373102: Should have a limit to the amount of content to log (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 5 months ago by rmistry
Modified:
12 years, 5 months ago
Reviewers:
yanivi
Base URL:
https://google-http-java-client.googlecode.com/hg/
Visibility:
Public.

Description

Fix for Bug http://code.google.com/p/google-http-java-client/issues/detail?id=43.

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressing code review comments #

Total comments: 4

Patch Set 3 : Addressing code review comments #

Total comments: 4

Patch Set 4 : Addressing code review comments #

Total comments: 4

Messages

Total messages: 9
rmistry
12 years, 5 months ago (2011-11-15 18:30:25 UTC) #1
yanivi
http://codereview.appspot.com/5373102/diff/1/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5373102/diff/1/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode338 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:338: "The content logging limit must be non negative."); non-negative ...
12 years, 5 months ago (2011-11-16 16:01:14 UTC) #2
rmistry
http://codereview.appspot.com/5373102/diff/1/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5373102/diff/1/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode338 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:338: "The content logging limit must be non negative."); On ...
12 years, 5 months ago (2011-11-16 20:38:14 UTC) #3
yanivi
only one important issue left http://codereview.appspot.com/5373102/diff/3002/google-http-client/src/main/java/com/google/api/client/http/LogContent.java File google-http-client/src/main/java/com/google/api/client/http/LogContent.java (right): http://codereview.appspot.com/5373102/diff/3002/google-http-client/src/main/java/com/google/api/client/http/LogContent.java#newcode63 google-http-client/src/main/java/com/google/api/client/http/LogContent.java:63: if (contentLength != -1 ...
12 years, 5 months ago (2011-11-16 22:12:28 UTC) #4
rmistry
FYI, I will wait for this CL to be LGTM'ed and submitted before doing the ...
12 years, 5 months ago (2011-11-16 23:41:06 UTC) #5
yanivi
http://codereview.appspot.com/5373102/diff/8002/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5373102/diff/8002/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode679 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:679: && (loggable && !disableContentLogging || logger.isLoggable(Level.ALL))) { we should ...
12 years, 5 months ago (2011-11-16 23:52:10 UTC) #6
rmistry
http://codereview.appspot.com/5373102/diff/8002/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5373102/diff/8002/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode679 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:679: && (loggable && !disableContentLogging || logger.isLoggable(Level.ALL))) { On 2011/11/16 ...
12 years, 5 months ago (2011-11-17 00:13:59 UTC) #7
yanivi
LGTM http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java File google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java (right): http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java#newcode680 google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:680: if (contentLength <= contentLoggingLimit && contentLoggingLimit != 0) ...
12 years, 5 months ago (2011-11-17 00:47:33 UTC) #8
rmistry
12 years, 5 months ago (2011-11-17 01:13:24 UTC) #9
http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/j...
File
google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java
(right):

http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/j...
google-http-client/src/main/java/com/google/api/client/http/HttpRequest.java:680:
if (contentLength <= contentLoggingLimit && contentLoggingLimit != 0) {
On 2011/11/17 00:47:33, yanivi wrote:
> [optional] merge with enclosing if-statement

Leaving it as if for now because the enclosing if-statement is already big. I
will merge after disableContentLogging is removed.

http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/j...
File google-http-client/src/main/java/com/google/api/client/http/LogContent.java
(right):

http://codereview.appspot.com/5373102/diff/6013/google-http-client/src/main/j...
google-http-client/src/main/java/com/google/api/client/http/LogContent.java:56:
Preconditions.checkArgument(contentLoggingLimit >= 0,
On 2011/11/17 00:47:33, yanivi wrote:
> [optional] not needed since this is already checked elsewhere

Leaving this because in-case LogContent is used from other classes in the future
then they know that -1 is not allowed.
Sign in to reply to this message.

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