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

Issue 32150: Corrections after the second round of code review. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
16 years, 10 months ago by fmil
Modified:
16 years, 5 months ago
Reviewers:
CC:
shindig.remailer_gmail.com
Visibility:
Public.

Description

Corrections after the second round of code review. o Weak typing of the cache key generation. o Coding style corrections. o Reverted unjustified variable name and comment changes. Reinforce the image rewriter tests. o Adds a test image. o Now checks the image dimensions. Improved parameter processing. o Corrected the parameter reading. o Ignore the unusable parameters. Applies the advice from the code review. The old behavior of AbstractHttpCache.getOwnerId() was to return ownerId as-is. Since ownerId may be null, this amounted to inserting a literal "null" in the cache key. As we probably don't want that (it's colliding with the owner id which in fact is "null"), the getOwnerId(HttpRequest) now returns an empty string literal for a null owner ID. Removed the text fixture that depends on the used JVM. The checksum-based tests turned out not to be portable across JVMs, so I had to exclude them, until I get a better idea on how to test the resize, without duplicating the actual resizing code. Changes Copyright (c) 2009 Google The code and cleanup to support proxied image resizing. Based on the initial work of Paul Lindner of Hi5. His work in turn is based on further contributions, but I don't know at present which ones. New contributions are Copyright (c) 2009 Google. Rest by Paul Lindner. o Reorganized the image rewriter implementation from Paul, and corrected a few bugs in the image dimensions computation. o A few readability changes. o Verified new behavior and added the tests to guard against accidental further behavior changes. o Modified the caching policy to take into account the resizing URL arguments required for resizing to work. o Factored the cache key building into a builder class that ensures backward compatibility of the generated cache keys, and makes building cache keys easier in general. o Added the tests to guard against accidental behavior changes in the cache key builder. o Fitted all the pieces back together again.

Patch Set 1 #

Patch Set 2 : Ignores null params in the cache key builder. #

Patch Set 3 : Corrects transparent and BGR image handling in the open proxy. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -17 lines) Patch
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java View 1 2 4 chunks +24 lines, -14 lines 0 comments Download
M java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/ImageUtils.java View 1 2 2 chunks +3 lines, -3 lines 0 comments Download

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