Skip to content

Commit 7b19e14

Browse files
committed
fix incorrect limit specification
1 parent a8e9f51 commit 7b19e14

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

dspace-api/src/main/java/org/dspace/app/reportdiff/ReportDiff.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,9 @@ public void setup() throws ParseException {
123123
if (commandLine.hasOption('d')) {
124124
showDates = true;
125125
try {
126-
limit = Long.parseLong(commandLine.getOptionValue("l"));
126+
if (commandLine.hasOption("l")) {
127+
limit = Long.parseLong(commandLine.getOptionValue("l"));
128+
}
127129
} catch (NumberFormatException e) {
128130
handler.logError("Invalid value for -l. Must be a valid number.");
129131
return;

dspace-api/src/main/java/org/dspace/app/reportdiff/ReportDiffScriptConfiguration.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ public Options getOptions() {
4343
"otherwise perform default checks).", HealthReport.getNumberOfChecks() - 1));
4444
options.getOption("c").setType(String.class);
4545

46-
options.addOption("d", "dates", false,
47-
"Limit the number of report entries to this value. " +
48-
"If not specified, all entries are shown.");
46+
options.addOption("d", "dates", false, "Show all report dates");
47+
48+
options.addOption("l", "limit", true,
49+
"Limit the number of entries (use only with -d). If omitted, all entries are shown.");
4950
options.getOption("l").setType(String.class);
5051

5152
options.addOption("f", "from", true,"Report from specific date [YYYY-MM-DD HH:mm:ss.SSS].");

0 commit comments

Comments
 (0)