RFR: 7855: JFR Writer incorrectly uses epoch nanoseconds as the start ticks [v2]
Jaroslav Bachorik
jbachorik at openjdk.org
Thu Oct 6 07:32:32 UTC 2022
On Thu, 6 Oct 2022 07:25:15 GMT, Jaroslav Bachorik <jbachorik at openjdk.org> wrote:
>> core/org.openjdk.jmc.flightrecorder.writer/src/main/java/org/openjdk/jmc/flightrecorder/writer/api/RecordingSettingsBuilder.java line 57:
>>
>>> 55: * @since 8.3.0
>>> 56: */
>>> 57: default RecordingSettingsBuilder withStartTicks(long ticks) {
>>
>> Do we really need a default method here? That is, could it be that we load an older implementation class of this interface that doesn't have this method implemented?
>
> I was being defensive here since this is a public API.
> But perhaps we can get away with a technically breaking change since our writer APIs are never accepting an instance of `RecordingSettings` but rather just providing it in a callback - that way we are still having the full control over the concrete instance being used.
Let's see what @thegreystone has to say - I agree that in this case the default methods don't make much sense, on the other hand there is the thing about API evolution and added interface methods ...
So it is more of a question of the code hygiene here.
-------------
PR: https://git.openjdk.org/jmc/pull/412
More information about the jmc-dev
mailing list