docs: public synchronized <T> void addToAttachmentList(final AttachmentKey<AttachmentList<T>> key, final T value) {
          if (key != null) {
              final Map<AttachmentKey<?>, Object> attachments = this.attachments;
              final AttachmentList<T> list = key.cast(attachments.get(key));
              if (list == null) {
                  final AttachmentList<T> newList = new AttachmentList<T>(((ListAttachmentKey<T>) key).getValueClass());
                  attachments.put(key, newList);
                  newList.add(value);
              } else {
                  list.add(value);
              }
          }
      }