mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-04-03 00:00:04 -04:00
Expanded test cases, fixed a potential NPE.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user