Polishing

This commit is contained in:
Juergen Hoeller
2018-03-28 12:06:38 +02:00
parent d1a0b8d53f
commit b2d87abcbb
6 changed files with 15 additions and 16 deletions

View File

@@ -100,7 +100,7 @@ public class BufferedImageHttpMessageConverter implements HttpMessageConverter<B
* @throws IllegalArgumentException if the given content type is not supported by the Java Image I/O API
*/
public void setDefaultContentType(@Nullable MediaType defaultContentType) {
if (defaultContentType!= null) {
if (defaultContentType != null) {
Iterator<ImageWriter> imageWriters = ImageIO.getImageWritersByMIMEType(defaultContentType.toString());
if (!imageWriters.hasNext()) {
throw new IllegalArgumentException(