commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles Sadowski (Jira)" <>
Subject [jira] [Commented] (COLLECTIONS-728) BloomFilter contribution
Date Tue, 29 Oct 2019 16:08:00 GMT


Gilles Sadowski commented on COLLECTIONS-728:

bq. implementation (

Nit: There are formatting issues which I mentioned in other reviews.

* Why an _abstract_ class instead of an _interface_ (and _default_ methods)?
* Why pass a {{Hasher}} to the {{Shape}} constructor when only its "name" is used?
* Why are methods _final_?  It's redundant for _private_ ones, and strange for those name
{{estimate...}} (one could imagine that subclasses could have their own way).
* Why doesn't {{Shape}} keep a reference to {{Hasher}}?  That would avoid having to pass both
to e.g. method {{contains}} in {{BloomFilter}} (and would make is unnecessary to check their
* I don't get the {{reset()}} method in {{HasherFactory}}.  At first sight, this class should
be immutable.
* In {{DynamicHasher}}, it seems that the "lock" construct could be advantageously replaced
with a builder (i.e. the returned {{Hasher}} instance would only offer the {{getBits()}} API.
* It seems strange to define the {{Hasher}} interface inside {{HasherFactory}} (IMO that should
be the other way around).
* What is the difference between {{StaticHasher}} and {{DynamicHasher}}?

I'm afraid that the review is not exhaustive; again, I have a hard time figuring out the fundamental
(design) structure from convenience features.  

> BloomFilter contribution
> ------------------------
>                 Key: COLLECTIONS-728
>                 URL:
>             Project: Commons Collections
>          Issue Type: Task
>            Reporter: Claude Warren
>            Priority: Minor
>         Attachments:,,,
> Contribution of BloomFilter library comprising base implementation and gated collections.

This message was sent by Atlassian Jira

View raw message