Hello,
I am using the following code from the Changes API documentation :
Changes changes = dbClient.changes()
.includeDocs(true)
.since(since)
.heartBeat(30000)
.continuousChanges();
while (changes.hasNext()) {
ChangesResult.Row feed = changes.next();
String docId = feed.getId();
System.out.println(docID);
}
At first, the pre-existing changes are printed fine.
But when a new change happens while the thread is running, feed.getId() throws a NullPointerException because feed is null.
So this means changes.next() returned null right after changes.hasNext() returned true. That doesn't seem logical.
Is this a known bug, or am I doing something wrong ?
Thanks
Foucauld
PS : My database is an IBM Cloudant based on CouchDB, it it supposed to be 100% CouchDB-compatible and until now all other APIs work perfectly.