This is an automated email from the ASF dual-hosted git repository.
ivank pushed a commit to branch branch-4.6
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.6 by this push:
new ee1999e ISSUE #784: LedgerEntries#close should not throw checked
exception
ee1999e is described below
commit ee1999e4ac27b491d67d4e60ba781d39253b046c
Author: Sijie Guo <[email protected]>
AuthorDate: Thu Nov 30 11:11:58 2017 +0100
ISSUE #784: LedgerEntries#close should not throw checked exception
Descriptions of the changes in this PR:
override `close()` in LedgerEntries to make it not throw checked exception.
Author: Sijie Guo <[email protected]>
Reviewers: Ivan Kelly <[email protected]>, Jia Zhai <[email protected]>
This closes #785 from sijie/dont_throw_exception_on_close, closes #784
(cherry picked from commit d5774858934bdfd22c8e873c355722750c50f33b)
Signed-off-by: Ivan Kelly <[email protected]>
---
.../main/java/org/apache/bookkeeper/client/api/LedgerEntries.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntries.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntries.java
index 1ee193f..2b9e300 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntries.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/api/LedgerEntries.java
@@ -42,10 +42,16 @@ public interface LedgerEntries
* Calling this method does not modify the reference count of the ByteBuf
in the returned LedgerEntry objects.
* The caller who calls {@link #iterator()} should make sure that they do
not call ByteBuf.release() on the
* LedgerEntry objects to avoid a double free.
- * All reference counts will be decremented when the containing
LedgerEntries object is closed.
+ * All reference counts will be decremented when the containing
LedgerEntries object is closed via {@link #close()}.
*
* @return an iterator of LedgerEntry objects
*/
@Override
Iterator<LedgerEntry> iterator();
+
+ /**
+ * Close to release the resources held by this instance.
+ */
+ @Override
+ void close();
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].