Skip to content

Commit ed14261

Browse files
authored
Add empty string validation to paginated reactions request for en… (#70)
Found out next param in returned JSON is deserialized to empty string object. Then when an empty string is passed into the method, it threw a confusing exception. So I added this validation to let users know that invalid param.
1 parent 6b07286 commit ed14261

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/io/getstream/core/StreamReactions.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ public CompletableFuture<Paginated<Reaction>> paginatedFilter(
144144
public CompletableFuture<Paginated<Reaction>> paginatedFilter(Token token, String next)
145145
throws StreamException {
146146
checkNotNull(next, "next can't be null");
147+
checkArgument(!next.trim().isEmpty(), "next can't be empty");
147148

148149
try {
149150
final URL url = new URL(baseURL, next);

0 commit comments

Comments
 (0)