Skip to content

Commit

Permalink
Replace deprecated StreamUtils API
Browse files Browse the repository at this point in the history
As of spring-projects/spring-framework#29125,
`StreamUtils..emptyInput()` is deprecated in favor of
`InputStream.nullInputStream()` from the JDK.

Closes: #4160
  • Loading branch information
bclozel authored and christophstrobl committed Sep 14, 2022
1 parent 44a1123 commit 7c7e704
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -74,7 +73,7 @@ public String getFilename() {

@Override
public InputStream getContent() {
return dataStream.orElse(StreamUtils.emptyInput());
return dataStream.orElse(InputStream.nullInputStream());
}

@Override
Expand Down

0 comments on commit 7c7e704

Please sign in to comment.