mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Used StringUtils.isBlank() to handle strings with blank spaces
This commit is contained in:
@@ -22,6 +22,7 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.openide.DialogDisplayer;
|
||||
import org.openide.NotifyDescriptor;
|
||||
import org.openide.util.NbBundle;
|
||||
@@ -136,9 +137,9 @@ final class FilesSetRulePanel extends javax.swing.JPanel {
|
||||
boolean isValidRuleDefinition() {
|
||||
// The rule must have a name.
|
||||
// If rule name is absent, set it as the Name Pattern since nameTextField cannot be left empty.
|
||||
if (this.ruleNameTextField.getText().isEmpty()) {
|
||||
if (StringUtils.isBlank(this.ruleNameTextField.getText())) {
|
||||
String ruleName = this.nameTextField.getText();
|
||||
if (ruleName != null && !ruleName.isEmpty()) {
|
||||
if (StringUtils.isNotBlank(ruleName)) {
|
||||
this.ruleNameTextField.setText(ruleName);
|
||||
} else {
|
||||
NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
|
||||
|
||||
Reference in New Issue
Block a user