blaze-persistence icon indicating copy to clipboard operation
blaze-persistence copied to clipboard

Potential java.lang.ClassCastException in KeysetAwarePageImpl#nextPageable

Open Mobe91 opened this issue 9 months ago • 0 comments
trafficstars

The current implementation of KeysetAwarePageImpl#nextPageable is:

    @Override
    public KeysetPageable nextPageable() {
        return (KeysetPageable) super.nextPageable();
    }

This assumes that super.nextPageable() always returns a KeysetPageable, which is not true. If hasNext() is false for the page, super.nextPageable() will return Pageable.unpaged() which is not instanceof KeysetPageable.

Mobe91 avatar Feb 07 '25 21:02 Mobe91