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:
committed by
Christoph Strobl
parent
44a1123034
commit
7c7e70418f
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user