3445 make Date Filter condition reject negative day value

This commit is contained in:
William Schaefer 2018-02-09 12:26:48 -05:00
parent e1cc0e7859
commit e03173c46b

View File

@ -395,7 +395,10 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
return false;
}
try {
Integer.parseInt(daysIncludedTextField.getText());
int value = Integer.parseInt(daysIncludedTextField.getText());
if (value < 0) {
throw new NumberFormatException("Negative numbers are not allowed for the within N days condition");
}
} catch (NumberFormatException e) {
//field did not contain an integer
NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(