@ -140,22 +141,23 @@ public class ServerSentEventHttpMessageReader implements HttpMessageReader<Objec
@@ -140,22 +141,23 @@ public class ServerSentEventHttpMessageReader implements HttpMessageReader<Objec
@ -66,7 +67,7 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -66,7 +67,7 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -87,6 +88,8 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -87,6 +88,8 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -175,7 +178,7 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -175,7 +178,7 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -221,7 +224,6 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -221,7 +224,6 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -235,9 +237,8 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -235,9 +237,8 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
StringfooValue=getStringOfSize(limit)+"and then some more";
@ -259,13 +260,6 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -259,13 +260,6 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -274,4 +268,12 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@@ -274,4 +268,12 @@ public class ServerSentEventHttpMessageReaderTests extends AbstractLeakCheckingT
@ -167,7 +167,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
@@ -167,7 +167,7 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
@ -194,6 +194,11 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
@@ -194,6 +194,11 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
catch(IOExceptionex){
thrownewHttpMessageNotReadableException("I/O error while reading input message",ex,inputMessage);
@ -296,6 +301,15 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
@@ -296,6 +301,15 @@ public abstract class AbstractMessageConverterMethodArgumentResolver implements
returnarg;
}
/**
*Allowforclosingthebodystreamifnecessary,
*e.g.forpartstreamsinamultipartrequest.
*/
voidcloseStreamIfNecessary(InputStreambody){
// No-op by default: A standard HttpInputMessage exposes the HTTP request stream
// (ServletRequest#getInputStream), with its lifecycle managed by the container.
@ -180,4 +182,17 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM
@@ -180,4 +182,17 @@ public class RequestPartMethodArgumentResolver extends AbstractMessageConverterM
returnpartName;
}
@Override
voidcloseStreamIfNecessary(InputStreambody){
// RequestPartServletServerHttpRequest exposes individual part streams,
// potentially from temporary files -> explicit close call after resolution