c.a.o.v.mockmvc.MockMvcRequest - Can't read request body

Issue #163 resolved
Illia Sorokoumov created an issue

The request matcher is printing this warning on every test where the request does not have a body (e.g. GET), which can be suppressed but IMO it would make more sense to swallow this warning inside the library or at least not print the entire stacktrace.

6412 [main] WARN  c.a.o.v.mockmvc.MockMvcRequest - Can't read request body..
java.io.IOException: Stream closed
    at java.io.BufferedReader.ensureOpen(BufferedReader.java:122)
    at java.io.BufferedReader.readLine(BufferedReader.java:317)
    at java.io.BufferedReader.readLine(BufferedReader.java:389)
    at com.atlassian.oai.validator.mockmvc.MockMvcRequest.getBody(MockMvcRequest.java:103)
    at com.atlassian.oai.validator.mockmvc.MockMvcRequest.of(MockMvcRequest.java:91)
    at com.atlassian.oai.validator.mockmvc.OpenApiMatchers.lambda$isValid$0(OpenApiMatchers.java:56)
    at org.springframework.test.web.servlet.MockMvc$1.andExpect(MockMvc.java:178)

Comments (4)

  1. Log in to comment