Skip to content

Commit

Permalink
Corrected failed int (slow) tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vest committed Jan 12, 2025
1 parent 0717621 commit 4b1146e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions code/src/java/pcgen/system/CommandLineArguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@

public class CommandLineArguments
{
private final Namespace namespace = new Namespace(new HashMap<>());
private Namespace namespace = new Namespace(new HashMap<>());

public CommandLineArguments(String[] args)
{
Validate.notNull(args, "Parameter 'args' must not be null");
var parser = this.getParser();
try
{
parser.parseArgs(args, this.namespace);
this.namespace = parser.parseArgs(args);
} catch (HelpScreenException e)
{
parser.handleError(e);
Expand Down Expand Up @@ -140,7 +140,7 @@ public boolean isVerbose()
{
// Why allow the flag multiple times and count them if we just evaluate them to boolean afterward?
// Seems unintentional.
return Optional.ofNullable(namespace.getBoolean("verbose"))
.orElse(false);
return Optional.ofNullable(namespace.getInt("verbose"))
.orElse(0) > 0;
}
}

0 comments on commit 4b1146e

Please sign in to comment.