Deprecate StreamUtils.emptyInput()
Closes gh-29125
This commit is contained in:
@@ -28,7 +28,6 @@ import org.apache.http.util.EntityUtils;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatusCode;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* {@link ClientHttpResponse} implementation based on
|
||||
@@ -84,7 +83,7 @@ final class HttpComponentsClientHttpResponse implements ClientHttpResponse {
|
||||
@Override
|
||||
public InputStream getBody() throws IOException {
|
||||
HttpEntity entity = this.httpResponse.getEntity();
|
||||
return (entity != null ? entity.getContent() : StreamUtils.emptyInput());
|
||||
return (entity != null ? entity.getContent() : InputStream.nullInputStream());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,6 @@ import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatusCode;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* {@link ClientHttpResponse} implementation based on OkHttp 3.x.
|
||||
@@ -69,7 +68,7 @@ class OkHttp3ClientHttpResponse implements ClientHttpResponse {
|
||||
@Override
|
||||
public InputStream getBody() throws IOException {
|
||||
ResponseBody body = this.response.body();
|
||||
return (body != null ? body.byteStream() : StreamUtils.emptyInput());
|
||||
return (body != null ? body.byteStream() : InputStream.nullInputStream());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SourceHttpMessageConverter<T extends Source> extends AbstractHttpMe
|
||||
(publicId, systemId) -> new InputSource(new StringReader(""));
|
||||
|
||||
private static final XMLResolver NO_OP_XML_RESOLVER =
|
||||
(publicID, systemID, base, ns) -> StreamUtils.emptyInput();
|
||||
(publicID, systemID, base, ns) -> InputStream.nullInputStream();
|
||||
|
||||
private static final Set<Class<?>> SUPPORTED_CLASSES = new HashSet<>(8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user