Announcement Announcement Module
Collapse
No announcement yet.
MockHttpServletResponse bug? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • MockHttpServletResponse bug?

    hello,

    I found an issue with MockHttpServletResponse that I believe can be considered as a bug.

    When I obtain a PrintWriter from the MockHttpServletResponse using getWriter() method, then a new OutputStreamWriter is created and wrapped inside a PrintWriter. When I write() something to that writer and later in my test use MockHttpServletResponse.getContentAsString() then the content might not yet contain everything I wrote to that PrintWriter because either the PrintWriter or OutputStreamWriter might be buffering their content.

    To resolve this I think the getContentAsString() and getContentAsByteArray() should call flushBuffer() first.

  • #2
    Please report a bug on JIRA for this issue.

    Comment

    Working...
    X