Deprecate StreamUtils.emptyInput()
Closes gh-29125
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -216,11 +216,14 @@ public abstract class StreamUtils {
|
||||
Assert.notNull(in, "No InputStream specified");
|
||||
return (int) in.transferTo(OutputStream.nullOutputStream());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an efficient empty {@link InputStream}.
|
||||
* @return an InputStream which contains no bytes
|
||||
* @since 4.2.2
|
||||
* @deprecated as of 6.0 in favor of {@link InputStream#nullInputStream()}
|
||||
*/
|
||||
@Deprecated
|
||||
public static InputStream emptyInput() {
|
||||
return InputStream.nullInputStream();
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.util.xml;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@@ -37,7 +38,6 @@ import org.xml.sax.ContentHandler;
|
||||
import org.xml.sax.XMLReader;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* Convenience methods for working with the StAX API. Partly historic due to JAXP 1.3
|
||||
@@ -54,7 +54,7 @@ import org.springframework.util.StreamUtils;
|
||||
public abstract class StaxUtils {
|
||||
|
||||
private static final XMLResolver NO_OP_XML_RESOLVER =
|
||||
(publicID, systemID, base, ns) -> StreamUtils.emptyInput();
|
||||
(publicID, systemID, base, ns) -> InputStream.nullInputStream();
|
||||
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user