Skip to content

Commit

Permalink
Updated library jAnsi & tweaked error message for invalid -d value
Browse files Browse the repository at this point in the history
  • Loading branch information
frossm committed Oct 14, 2023
1 parent f53d03f commit 09ec9e5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>org.fross</groupId>
<artifactId>quoter</artifactId>
<version>5.0.25</version>
<version>5.0.26</version>
<packaging>jar</packaging>

<name>quoter</name>
Expand Down Expand Up @@ -208,7 +208,7 @@
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>2.4.0</version>
<version>2.4.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/us.codecraft/xsoup -->
Expand Down
2 changes: 1 addition & 1 deletion snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: quoter
version: '5.0.25'
version: '5.0.26'
summary: Command line utility to pull stock and index quotes
description: |
Quoter fetches online stock quotes and index data for easy display on
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/fross/quoter/CommandLineParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void validate(String name, String value) throws ParameterException {
}
}

// Validate the trending duration value provided is between 1 and 99
// Validate the trending duration value provided is between 1 and 365
final static public class TrendDurationValidator implements IParameterValidator {
public TrendDurationValidator() {
}
Expand All @@ -121,10 +121,10 @@ public void validate(String name, String value) {
try {
intVal = Integer.parseInt(value);
if (intVal < 1 || intVal > 365) {
Output.fatalError("Trend duration can not be '" + value + "'. Value must be between 1 and 365", 1);
throw new ParameterException("");
}
} catch (Exception e) {
Output.fatalError("Trend duration can not be '" + value + "'. Value must be between 1 and 365", 1);
Output.fatalError("Trend duration can not be '" + value + "'. Value must be a number between 1 and 365", 1);
}
}
}
Expand Down

0 comments on commit 09ec9e5

Please sign in to comment.