浏览代码

Make not empty validator do a null check

Change-Id: Ic75627eee59724b171fe12ee92934e8b23fc79f7
Reviewed-on: http://gerrit.dmdirc.com/697
Automatic-Compile: Shane Mc Cormack <shane@dmdirc.com>
Reviewed-by: Shane Mc Cormack <shane@dmdirc.com>
tags/0.6.3b1
Gregory Holmes 14 年前
父节点
当前提交
a2f15926ce
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      src/com/dmdirc/config/prefs/validator/NotEmptyValidator.java

+ 1
- 1
src/com/dmdirc/config/prefs/validator/NotEmptyValidator.java 查看文件

@@ -37,7 +37,7 @@ public class NotEmptyValidator implements Validator<String> {
37 37
     /** {@inheritDoc} */
38 38
     @Override
39 39
     public ValidationResponse validate(final String object) {
40
-        if (object.isEmpty()) {
40
+        if (object == null || object.isEmpty()) {
41 41
             return new ValidationResponse("Cannot be an empty string.");
42 42
         } else {
43 43
             return new ValidationResponse();

正在加载...
取消
保存