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,6 +74,7 @@ public class BlackList extends ArrayList<BlackList.Blacklisted> implements Confi
add((Blacklisted) el); add((Blacklisted) el);
} else { } else {
try { try {
if (el != null)
add(el.toString()); add(el.toString());
} catch (InvalidValueException e) { } catch (InvalidValueException e) {
System.err.println(e.getCause().getMessage()); System.err.println(e.getCause().getMessage());

View file

@ -66,6 +66,7 @@ public class BlackListEntity extends ArrayList<BlackListEntity.Blacklisted> impl
add((Blacklisted) el); add((Blacklisted) el);
} else { } else {
try { try {
if (el != null)
add(el.toString()); add(el.toString());
} catch (InvalidValueException e) { } catch (InvalidValueException e) {
System.err.println((e.getCause() != null ? e.getCause() : e).getMessage()); System.err.println((e.getCause() != null ? e.getCause() : e).getMessage());