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

Fixing Issue 796 #797

Closed
wants to merge 1 commit into from
Closed

Conversation

Emily-Jiang
Copy link
Member

No description provided.

Copy link
Contributor

@tjquinno tjquinno left a comment

Choose a reason for hiding this comment

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

Here is one (strongly) suggested change.

@@ -64,7 +64,9 @@ public abstract class Snapshot {
*
* @return an array of {@link HistogramBucket} if it is available or an empty array if not available
*/
public abstract HistogramBucket[] bucketValues();
public HistogramBucket[] bucketValues() {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the default implementation return new HistogramBucket[0] to conform to the Javadoc?

Also, I realize that there is normally not much of a need for unit tests because the TCK covers the testing needs. But in this case would it make sense to add a unit test class that extends Snapshot but does not have its own implementation of this method? Simply trying to compile the class during a normal build would verify that the default implementation on Snapshot is in place.

<version>5.1.2-SNAPSHOT</version>
<version>5.2.0-SNAPSHOT</version>
Copy link
Contributor

@tjquinno tjquinno Sep 26, 2024

Choose a reason for hiding this comment

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

If the PR is changing the version to 5.2.0 to avoid the bnd baseline failures I was seeing in my local change (I was trying to use 5.1.2-SNAPSHOT) I understand this and the other version changes, but the change to the Snapshot abstract class is not a functional addition over 5.1.1 as true semantic versioning would imply if released as 5.2.0.

Releasing the change to Snapshot as 5.1.2 would be more intuitive to our consumers, but it seems the PR would have to add a bnd baseline exclusion for the updated method. I was not able to look into that. Perhaps @Channyboy can help here?

@Emily-Jiang
Copy link
Member Author

Close this one as this is just a demo on how to fix it normally. After some discussion, the group has agreed not to track the method update on the Snapshot and perform a micro release. The official fix is here

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