testng: skip empty strings in configuration of groups (IDEA-163189)

This commit is contained in:
Anna.Kozlova
2016-10-27 17:58:40 +02:00
parent 89826e5f39
commit afc3218bb3
@@ -77,8 +77,10 @@ public class DependsOnGroupsInspection extends BaseJavaLocalInspectionTool {
textField.getDocument().addDocumentListener(new DocumentAdapter() {
protected void textChanged(final DocumentEvent e) {
groups.clear();
final String[] groupsFromString = textField.getText().split("[, ]");
ContainerUtil.addAll(groups, groupsFromString);
String text = textField.getText();
if (!StringUtil.isEmptyOrSpaces(text)) {
ContainerUtil.addAll(groups, text.split("[, ]"));
}
}
});
definedGroups.setComponent(textField);