Skip to content

Commit

Permalink
Improved code style
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoOfTwelve committed Jan 15, 2025
1 parent 2c3ac44 commit 3263a51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cli/src/main/java/de/jplag/cli/picocli/CliInputHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class CliInputHandler {
private static final String OPTION_LIST_HEADING = "Parameter descriptions: ";

private static final String AMBIGUOUS_VIEW_FILE = "There are multiple files selected for '--mode VIEW', Please make sure to only specify one.";
private static final String AMBIGUOUS_VIEW_FILE = "There are multiple files specified for '--mode VIEW', please make sure only to specify one.";
private static final String UNKNOWN_LANGUAGE_EXCEPTION = "Language %s does not exists. Available languages are: %s";
private static final String IMPOSSIBLE_EXCEPTION = "This should not have happened."
+ " Please create an issue on github (https://github.com/jplag/JPlag/issues) with the entire output.";
Expand All @@ -45,6 +45,8 @@ public class CliInputHandler {
private static final String PARAMETER_SHORT_PREFIX = " -";
private static final String PARAMETER_SHORT_ADDITIONAL_INDENT = " ";

private static final char RESULT_FILE_OPTION_NAME = 'r';

private static final Random RANDOM = new SecureRandom();

private final String[] args;
Expand Down Expand Up @@ -183,7 +185,7 @@ public File getFileForViewMode() throws CliException {
validOptions.addAll(List.of(this.options.newDirectories));
validOptions.addAll(List.of(this.options.oldDirectories));

if (this.parseResult.hasMatchedOption('r')) {
if (this.parseResult.hasMatchedOption(RESULT_FILE_OPTION_NAME)) {
validOptions.add(new File(this.options.resultFile));
}

Expand Down

0 comments on commit 3263a51

Please sign in to comment.