From e03173c46bf247b9c95b6a038f39b3ac5a0e677b Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 9 Feb 2018 12:26:48 -0500 Subject: [PATCH] 3445 make Date Filter condition reject negative day value --- .../autopsy/modules/interestingitems/FilesSetRulePanel.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java index bead96c5ed..4965652c5f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java +++ b/Core/src/org/sleuthkit/autopsy/modules/interestingitems/FilesSetRulePanel.java @@ -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(