Skip to content

Commit 7c7e704

Browse files
bclozelchristophstrobl
authored andcommittedSep 14, 2022
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
1 parent 44a1123 commit 7c7e704

File tree

1 file changed

+1
-2
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs

1 file changed

+1
-2
lines changed
 

‎spring-data-mongodb/src/main/java/org/springframework/data/mongodb/gridfs/GridFsUpload.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.springframework.data.util.Lazy;
2525
import org.springframework.lang.Nullable;
2626
import org.springframework.util.Assert;
27-
import org.springframework.util.StreamUtils;
2827

2928
import com.mongodb.client.gridfs.model.GridFSFile;
3029

@@ -74,7 +73,7 @@ public String getFilename() {
7473

7574
@Override
7675
public InputStream getContent() {
77-
return dataStream.orElse(StreamUtils.emptyInput());
76+
return dataStream.orElse(InputStream.nullInputStream());
7877
}
7978

8079
@Override

0 commit comments

Comments
 (0)