Skip to content

Found a minor Javadoc vs implementation discrepancy. #435

Merged
leerho merged 4 commits intomasterfrom
minor-updates
Mar 20, 2023
Merged

Found a minor Javadoc vs implementation discrepancy. #435
leerho merged 4 commits intomasterfrom
minor-updates

Conversation

@leerho
Copy link
Member

@leerho leerho commented Mar 20, 2023

This is WRT getQuantiles(int numEvenlySpaced) methods and the implementation of the QuantilesUtil.evenlySpaced(...) method.

The javadocs of the getQuantiles methods (for all quantiles sketches) claimed that a "numEvenlySpaced == 1" was valid, yet the implementation would throw an exception if "numEvenlySpaced < 2".

So I updated the implementation so that the implementation matched the javadocs.

I also updated the relevant quantiles javadocs to reflect that this exception could be thrown.

The only place this QuantilesUtil.evenlySpaced(...) method was used was for these quantiles methods, so no place else in the library used this common method.

getQuantiles(int numEvenlySpaced) methods and the implementation of the
QuantilesUtil.evenlySpaced(...) method.

The javadocs of the getQuantiles methods (for all quantiles sketches)
claimed that a "numEvenlySpaced == 1" was valid, yet the implementation
would throw an exception if "numEvenlySpaced < 2".

So I updated the implementation so that the implementation matched the
javadocs.

I also updated the relevant quantiles javadocs to reflect that this
exception could be thrown.

The only place this QuantilesUtil.evenlySpaced(...) method was used was
for these quantiles methods, so no place else in the library used this
method.
@leerho leerho merged commit 9f0f414 into master Mar 20, 2023
@leerho leerho deleted the minor-updates branch March 20, 2023 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants