Replace deprecated StreamUtils API

As of spring-projects/spring-framework#29125,
`StreamUtils..emptyInput()` is deprecated in favor of
`InputStream.nullInputStream()` from the JDK.

Closes: #4160
This commit is contained in:
Brian Clozel
2022-09-12 10:00:52 +02:00
committed by Christoph Strobl
parent 44a1123034
commit 7c7e70418f

View File

@@ -24,7 +24,6 @@ import org.bson.types.ObjectId;
import org.springframework.data.util.Lazy;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.StreamUtils;
import com.mongodb.client.gridfs.model.GridFSFile;
@@ -74,7 +73,7 @@ public class GridFsUpload<ID> implements GridFsObject<ID, InputStream> {
@Override
public InputStream getContent() {
return dataStream.orElse(StreamUtils.emptyInput());
return dataStream.orElse(InputStream.nullInputStream());
}
@Override