From: Niki Roo Date: Wed, 9 Mar 2016 13:29:52 +0000 (+0100) Subject: Woops. (List#addAll() does not accept NULL.) X-Git-Tag: v1.0-beta3~22 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=49a08b5df6d29e0345ee34c714f265084625b31f;p=jvcard.git Woops. (List#addAll() does not accept NULL.) --- diff --git a/src/be/nikiroo/jvcard/BaseClass.java b/src/be/nikiroo/jvcard/BaseClass.java index fe7742a..b96edea 100644 --- a/src/be/nikiroo/jvcard/BaseClass.java +++ b/src/be/nikiroo/jvcard/BaseClass.java @@ -36,7 +36,11 @@ public abstract class BaseClass> implements List { */ protected BaseClass(List list) { this.list = new ArrayList(); - list.addAll(list); + + if (list != null) { + this.list.addAll(list); + } + for (E child : this) { _enter(child, true); }