You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by jo...@gmail.com on 2010/06/28 23:14:56 UTC
Fix NPE in BasicImageRewriter (issue1722047)
One thought, plus could I get a quick test for this?
http://codereview.appspot.com/1722047/diff/1/2
File
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java
(right):
http://codereview.appspot.com/1722047/diff/1/2#newcode149
java/gadgets/src/main/java/org/apache/shindig/gadgets/rewrite/image/BasicImageRewriter.java:149:
(requestedWidth == null || imageInfo.getWidth() <= requestedWidth)) {
This is clearly better than status quo, and I'll submit it.
Even so, it would be nice to support no_expand=1 with one or the other
of resize_w/resize_h (providing a scaled bounding-box). Doing so
mandates moving the logic @175 et al higher in the class, to compute
whichever is missing from whichever is present. Thoughts?
http://codereview.appspot.com/1722047/show