Expanded test cases, fixed a potential NPE.

This commit is contained in:
Harald Kuhr
2011-04-15 17:05:47 +02:00
parent 521c4e4bbc
commit c6d6a86343
3 changed files with 157 additions and 3 deletions

View File

@@ -114,9 +114,7 @@ public abstract class ImageFilter extends GenericFilter {
// Make image available to other filters (avoid unnecessary serializing/deserializing)
imageResponse.setImage(image);
//System.out.println("Done.");
}
if (encode) {
//System.out.println("Encoding image...");
// Encode image to original response

View File

@@ -189,7 +189,7 @@ class ImageServletResponseImpl extends HttpServletResponseWrapper implements Ima
String outputType = getOutputContentType();
// Force transcoding, if no other filtering is done
if (!outputType.equals(originalContentType)) {
if (outputType != null && !outputType.equals(originalContentType)) {
getImage();
}