Fix for #110 (NPE for empty BlackList-String-Entry)

This commit is contained in:
Jascha Starke 2013-04-01 22:42:21 +02:00
parent 76147c3c52
commit d7280f6d69
2 changed files with 4 additions and 2 deletions

View file

@ -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());
}

View file

@ -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());
}