Fix for #110 (NPE for empty BlackList-String-Entry)
This commit is contained in:
parent
76147c3c52
commit
d7280f6d69
2 changed files with 4 additions and 2 deletions
|
@ -74,7 +74,8 @@ public class BlackList extends ArrayList<BlackList.Blacklisted> implements Confi
|
|||
add((Blacklisted) el);
|
||||
} else {
|
||||
try {
|
||||
add(el.toString());
|
||||
if (el != null)
|
||||
add(el.toString());
|
||||
} catch (InvalidValueException e) {
|
||||
System.err.println(e.getCause().getMessage());
|
||||
}
|
||||
|
|
|
@ -66,7 +66,8 @@ public class BlackListEntity extends ArrayList<BlackListEntity.Blacklisted> impl
|
|||
add((Blacklisted) el);
|
||||
} else {
|
||||
try {
|
||||
add(el.toString());
|
||||
if (el != null)
|
||||
add(el.toString());
|
||||
} catch (InvalidValueException e) {
|
||||
System.err.println((e.getCause() != null ? e.getCause() : e).getMessage());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue