From 3c8a47bd06023cf8eba681f56720c7dc5d532662 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Wed, 3 Mar 2010 11:14:30 +0000 Subject: [PATCH] SPR-6877 - AnnotationMethodHandlerAdapter.handleResponseBody prioritizes messageConverter over MediaType --- .../servlet/mvc/annotation/ServletAnnotationControllerTests.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java b/org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java index c0681bcb03..f994b54e92 100644 --- a/org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java +++ b/org.springframework.web.servlet/src/test/java/org/springframework/web/servlet/mvc/annotation/ServletAnnotationControllerTests.java @@ -2209,6 +2209,7 @@ public class ServletAnnotationControllerTests { public void write(Object o, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, HttpMessageNotWritableException { outputMessage.getHeaders().setContentType(contentType); + outputMessage.getBody(); // force a header write } }