Method bucketValues does not exist in 5.0.0 specification of org.eclipse.microprofile.metrics.Snapshot, causing that a class extending Snapshot is not compilable when upgrading.
New abstract methods (on abstract clases or interfaces) should always be created with default implementation, otherwise this is a backward incompatible change and should be done in a major version.
/**
* Returns an array of {@link HistogramBucket} containing the bucket and associated value of this {@link Snapshot}
* at the moment invocation.
*
* @return an array of {@link HistogramBucket} if it is available or an empty array if not available
*/
public abstract HistogramBucket[] bucketValues();
To reproduce:
- Use MP Metrics 5.0.0
- Create a class that extends
org.eclipse.microprofile.metrics.Snapshot
- Compile the project
- Upgrade dependency to MP Metrics 5.1.1
- Try to re-compile the project
The compilation fails with
MyImplementation is not abstract and does not override abstract method bucketValues() in org.eclipse.microprofile.metrics.Snapshot
Method
bucketValuesdoes not exist in 5.0.0 specification oforg.eclipse.microprofile.metrics.Snapshot, causing that a class extendingSnapshotis not compilable when upgrading.New abstract methods (on abstract clases or interfaces) should always be created with default implementation, otherwise this is a backward incompatible change and should be done in a major version.
To reproduce:
org.eclipse.microprofile.metrics.SnapshotThe compilation fails with