ComboBoxMultiselect for Vaadin 8 Throws Error When Selecting All / Clearing

For the purpose of lazy loading, I have a custom DataProvider (extended from the AbstractBackendDataContainer) set to @BonPrix’s ComboBoxMultiSelect (an addon for Framework 8, using version 2.7, last updated two weeks ago)

I noticed that in the clear and selectAll methods of the addon component, the ListDataProvider is being used. Thus in this case, when either of the two functions are being run, I would get a Casting Exception error.

My DataProvider:

public class ItemDataProvider extends AbstractBackEndDataProvider<SkusSelectBox, String> {
    
    private static final long serialVersionUID = 1L;
    private final ReceiptService receiptService;
 
   public ItemDataProvider(ReceiptService receiptService) {
        if(receiptService != null){
            this.receiptService = receiptService;
        }else {
            this.receiptService = new ReceiptService();
        }
    }
     
   @Override
    protected Stream<SkusSelectBox> fetchFromBackEnd(Query<SkusSelectBox, String> query) {
        return receiptService.fetchSkus(query.getFilter().orElse(null), query.getLimit(), query.getOffset(), query.getSortOrders()).stream();
    }

    @Override
    protected int sizeInBackEnd(Query<SkusSelectBox, String> query) {
        return receiptService.countSkus(query.getFilter().orElse(null));
    }

    @Override
    public Object getId(SkusSelectBox item) {
        return item.getItemId();
    }
    
}

The SkusSelectBox object is a simple two-attribute object, both using Strings.

The addon’s clear and selectAll is as follows:

@Override
        public void selectAll(final String filter) {
            final ListDataProvider<T> listDataProvider = ((ListDataProvider) getDataProvider());
            final Set<String> addedItems = listDataProvider.getItems()
                    .stream()
                    .filter(t -> {
                        final String caption = getItemCaptionGenerator().apply(t);
                        if (t == null) {
                            return false;
                        }
                        return caption.toLowerCase()
                                .contains(filter.toLowerCase());
                    })
                    .map(t -> itemToKey(t))
                    .collect(Collectors.toSet());
            updateSelection(addedItems, new HashSet<>(), true);
        }

        @Override
        public void clear(final String filter) {
            final ListDataProvider<T> listDataProvider = ((ListDataProvider) getDataProvider());
            final Set<String> removedItems = listDataProvider.getItems()
                    .stream()
                    .filter(t -> {
                        final String caption = getItemCaptionGenerator().apply(t);
                        if (t == null) {
                            return false;
                        }
                        return caption.toLowerCase()
                                .contains(filter.toLowerCase());
                    })
                    .map(t -> itemToKey(t))
                    .collect(Collectors.toSet());
            updateSelection(new HashSet<>(), removedItems, true);
        };

Another question is that whether overloading both of those methods should solve that problem or if not, is there a much simpler solution in casting it to a ListDataProvider?