apache / apache/bookkeeper

Mismatch between javadoc of `org.apache.bookkeeper.client.api.LedgerEntry.getLength` and its implementation

Open
#2,953 1 comment 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Java
Stars
2k
Forks
976
Avg merge
6d 15h
Merged PRs (30d)
7

Description

**BUG REPORT**

***Describe the bug***
* Javadoc here:
```javadoc
/**
* The length of the entry, that is the size of the content expressed in bytes.
*
* @return the size of the content
*/
long getLength();
```
* The implementation returns accumulated entry payload(no metadata) length till returned entry(inclusive).

***To Reproduce***
Omit.

***Expected behavior***
Consistent between javadoc and its implementation.

***Screenshots***

None.

***Additional context***
I checked [commit tree](https://github.com/apache/bookkeeper/tree/95373234a273920fadc06742479ddcc4e603fa1b) where `LedgerEntry` interface has not been added. `getLength` returned accumulated length. If this is intended, I think it deserve a more verbose name.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.