Woops. (List#addAll() does not accept NULL.)
authorNiki Roo <roo.niki@gmail.com>
Wed, 9 Mar 2016 13:29:52 +0000 (14:29 +0100)
committerNiki Roo <roo.niki@gmail.com>
Wed, 9 Mar 2016 13:29:52 +0000 (14:29 +0100)
src/be/nikiroo/jvcard/BaseClass.java

index fe7742ab1cea0d52c1d71b77742b2ea6b7ad066a..b96edea6ee60f33a2eda0acb8ac908ebd59a4d07 100644 (file)
@@ -36,7 +36,11 @@ public abstract class BaseClass<E extends BaseClass<?>> implements List<E> {
         */
        protected BaseClass(List<E> list) {
                this.list = new ArrayList<E>();
-               list.addAll(list);
+               
+               if (list != null) {
+                       this.list.addAll(list);
+               }
+               
                for (E child : this) {
                        _enter(child, true);
                }