diff --git a/java/org/rocksdb/AbstractRocksIterator.java b/java/org/rocksdb/AbstractRocksIterator.java index cc7cf064f1..08bd9dc23f 100644 --- a/java/org/rocksdb/AbstractRocksIterator.java +++ b/java/org/rocksdb/AbstractRocksIterator.java @@ -8,13 +8,13 @@ package org.rocksdb; /** * Base class implementation for Rocks Iterators * in the Java API - *

+ * *

Multiple threads can invoke const methods on an RocksIterator without * external synchronization, but if any of the threads may call a * non-const method, all threads accessing the same RocksIterator must use * external synchronization.

* - * @param P The type of the Parent Object from which the Rocks Iterator was + * @param

The type of the Parent Object from which the Rocks Iterator was * created. This is used by disposeInternal to avoid double-free * issues with the underlying C++ object. * @see org.rocksdb.RocksObject @@ -78,7 +78,7 @@ public abstract class AbstractRocksIterator

/** *

Deletes underlying C++ iterator pointer.

- *

+ * *

Note: the underlying handle can only be safely deleted if the parent * instance related to a certain RocksIterator is still valid and initialized. * Therefore {@code disposeInternal()} checks if the parent is initialized diff --git a/java/org/rocksdb/RocksIteratorInterface.java b/java/org/rocksdb/RocksIteratorInterface.java index 15f3a9aa9a..b5cc90afb2 100644 --- a/java/org/rocksdb/RocksIteratorInterface.java +++ b/java/org/rocksdb/RocksIteratorInterface.java @@ -10,7 +10,7 @@ package org.rocksdb; * access to data one entry at a time. Multiple implementations * are provided by this library. In particular, iterators are provided * to access the contents of a DB and Write Batch.

- *

+ * *

Multiple threads can invoke const methods on an RocksIterator without * external synchronization, but if any of the threads may call a * non-const method, all threads accessing the same RocksIterator must use @@ -43,7 +43,7 @@ public interface RocksIteratorInterface { /** *

Position at the first entry in the source whose key is that or * past target.

- *

+ * *

The iterator is valid after this call if the source contains * a key that comes at or past target.

* @@ -55,7 +55,7 @@ public interface RocksIteratorInterface { /** *

Moves to the next entry in the source. After this call, Valid() is * true if the iterator was not positioned at the last entry in the source.

- *

+ * *

REQUIRES: {@link #isValid()}

*/ public void next(); @@ -63,13 +63,13 @@ public interface RocksIteratorInterface { /** *

Moves to the previous entry in the source. After this call, Valid() is * true if the iterator was not positioned at the first entry in source.

- *

+ * *

REQUIRES: {@link #isValid()}

*/ public void prev(); /** - * If an error has occurred, return it. Else return an ok status. * If non-blocking IO is requested and this operation cannot be * satisfied without doing some IO, then this returns Status::Incomplete().

* diff --git a/java/org/rocksdb/test/WriteBatchWithIndexTest.java b/java/org/rocksdb/test/WriteBatchWithIndexTest.java index de2b637ff6..dac3f11106 100644 --- a/java/org/rocksdb/test/WriteBatchWithIndexTest.java +++ b/java/org/rocksdb/test/WriteBatchWithIndexTest.java @@ -217,19 +217,19 @@ public class WriteBatchWithIndexTest { it.seek(key); assertThat(it.isValid()).isTrue(); - assertThat(it.entry()).isEqualTo(expected[testOffset]); + assertThat(it.entry().equals(expected[testOffset])).isTrue(); } //forward iterative access int i = 0; for(it.seekToFirst(); it.isValid(); it.next()) { - assertThat(it.entry()).isEqualTo(expected[i++]); + assertThat(it.entry().equals(expected[i++])).isTrue(); } //reverse iterative access i = expected.length - 1; for(it.seekToLast(); it.isValid(); it.prev()) { - assertThat(it.entry()).isEqualTo(expected[i--]); + assertThat(it.entry().equals(expected[i--])).isTrue(); } } finally {