Skip to content

Commit

Permalink
Added @positive annotation to numberOfRecordsToKeep
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulBoon committed Sep 10, 2024
1 parent 5bd03f8 commit c058bd1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import picocli.CommandLine;

import javax.validation.constraints.Positive;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
Expand Down Expand Up @@ -59,6 +60,7 @@ static class UserOptions {

@CommandLine.Parameters(index = "0", paramLabel = "number-of-records-to-keep",
description = "The number of notification records to keep.")
@Positive
private int numberOfRecordsToKeep;

private record NotificationTruncateParams(Database db, int userId, int numberOfRecordsToKeep) {
Expand Down

0 comments on commit c058bd1

Please sign in to comment.