diff --git a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsUpload.java b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsUpload.java index afd2fa9b83..94b6fdbf85 100644 --- a/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsUpload.java +++ b/spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsUpload.java @@ -24,7 +24,6 @@ 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 String getFilename() { @Override public InputStream getContent() { - return dataStream.orElse(StreamUtils.emptyInput()); + return dataStream.orElse(InputStream.nullInputStream()); } @Override