Deprecate StreamUtils.emptyInput()

Closes gh-29125
This commit is contained in:
Brian Clozel
2022-09-09 22:43:40 +02:00
parent d4a74c8f9d
commit 0770d86936
14 changed files with 29 additions and 34 deletions

View File

@@ -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());
}
}

View File

@@ -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) {