Skip to content

Commit

Permalink
chore: add limit to SortedDumpRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemDoum committed Jul 24, 2023
1 parent f2e81be commit 8c6f7fb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/org/icij/datashare/Objects.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,14 +215,17 @@ public SortItem.Direction toDsl() {
protected static class SortedDumpRequest {
protected final DumpFormat format;
protected final List<DocumentSortItem> sort;
protected final long limit;

@JsonCreator
protected SortedDumpRequest(
@JsonProperty("format") DumpFormat format,
@JsonProperty("sort") List<DocumentSortItem> sort
@JsonProperty("sort") List<DocumentSortItem> sort,
@JsonProperty("limit") long limit
) {
this.format = format;
this.sort = sort;
this.format = java.util.Objects.requireNonNull(format, "missing dump format");
this.sort = java.util.Objects.requireNonNull(sort, "missing sort");
this.limit = limit;
}
}

Expand Down

0 comments on commit 8c6f7fb

Please sign in to comment.