vert-x3 / vertx-infinispan

Infinispan Cluster Manager for Vert.x
Apache License 2.0
14 stars 16 forks source link

entryStream() throws an exception #106

Closed ruslansennov closed 2 years ago

ruslansennov commented 2 years ago

Converting infinispan's entryStream to kotlin's ReceiveChannel throws an exception:

java.lang.NullPointerException: Cannot invoke "org.infinispan.commons.util.CloseableIteratorCollection.iterator()" because "this.iterable" is null
    at io.vertx.ext.cluster.infinispan.impl.CloseableIteratorCollectionStream.lambda$doRead$2(CloseableIteratorCollectionStream.java:134)

This can be reproduced by adding stream.fetch(1) to the very last line of the loadData callback (like it does in the ReadStream<T>.toChannel()) in InfinispanClusteredAsyncMapTest (reproduces occasionally).

I'll provide a PR to fix this soon.

tsegismont commented 2 years ago

Thank you!