Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make BloomFilter.bitSize() public #6923

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion android/guava/src/com/google/common/hash/BloomFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ public long approximateElementCount() {

/** Returns the number of bits in the underlying bit array. */
@VisibleForTesting

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now that we've made it public should we remove the annotation?

The documentation states the following

Do not use this interface for public or protected declarations: it is a fig leaf for bad design, and it does not prevent anyone from using the declaration---and experience has shown that they will. If the method breaks the encapsulation of its class, then its internal representation will be hard to change. Instead, use RestrictedApiChecker , which enforces fine-grained visibility policies.

long bitSize() {
public long bitSize() {
return bits.bitSize();
}

Expand Down
2 changes: 1 addition & 1 deletion guava/src/com/google/common/hash/BloomFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ public long approximateElementCount() {

/** Returns the number of bits in the underlying bit array. */
@VisibleForTesting

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

long bitSize() {
public long bitSize() {
return bits.bitSize();
}

Expand Down