Deprecate StreamUtils.emptyInput()
Closes gh-29125
This commit is contained in:
@@ -23,7 +23,6 @@ import java.sql.Blob;
|
||||
import java.sql.SQLException;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* Simple JDBC {@link Blob} adapter that exposes a given byte array or binary stream.
|
||||
@@ -65,7 +64,7 @@ class PassThroughBlob implements Blob {
|
||||
return new ByteArrayInputStream(this.content);
|
||||
}
|
||||
else {
|
||||
return (this.binaryStream != null ? this.binaryStream : StreamUtils.emptyInput());
|
||||
return (this.binaryStream != null ? this.binaryStream : InputStream.nullInputStream());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.sql.SQLException;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.util.StreamUtils;
|
||||
|
||||
/**
|
||||
* Simple JDBC {@link Clob} adapter that exposes a given String or character stream.
|
||||
@@ -84,7 +83,7 @@ class PassThroughClob implements Clob {
|
||||
}
|
||||
else {
|
||||
return new InputStreamReader(
|
||||
(this.asciiStream != null ? this.asciiStream : StreamUtils.emptyInput()),
|
||||
(this.asciiStream != null ? this.asciiStream : InputStream.nullInputStream()),
|
||||
StandardCharsets.US_ASCII);
|
||||
}
|
||||
}
|
||||
@@ -100,7 +99,7 @@ class PassThroughClob implements Clob {
|
||||
return new ByteArrayInputStream(tempContent.getBytes(StandardCharsets.US_ASCII));
|
||||
}
|
||||
else {
|
||||
return (this.asciiStream != null ? this.asciiStream : StreamUtils.emptyInput());
|
||||
return (this.asciiStream != null ? this.asciiStream : InputStream.nullInputStream());
|
||||
}
|
||||
}
|
||||
catch (IOException ex) {
|
||||
|
||||
Reference in New Issue
Block a user