You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It wraps around a Callable that throws E. The return of this method is another Callable that would delegate to the provided code and also makes an observation.
Then there is no need that the method wrapChecked should also throw E. The wrapping logic should not encounter any exception. I think this might have been a mistake during design or compilation.
The text was updated successfully, but these errors were encountered:
nobeh
changed the title
Observation#wrapChecked(io.micrometer.observation.Observation.CheckedCallable<T,E>) should not throw E itself
Observation#wrapChecked(CheckedCallable<T,E>) should not throw E itself
May 15, 2024
Thanks for the report. That does seem like a mistake. The problem is I think while it would be binary compatible to remove the checked exception (throws), I don't think it would be source compatible.
Describe the bug
io.micrometer.observation.Observation#wrapChecked(Observation.CheckedCallable<T,E>)
is as follows:It wraps around a
Callable
that throwsE
. The return of this method is anotherCallable
that would delegate to the provided code and also makes an observation.If we rewrite the method as:
Then there is no need that the method
wrapChecked
should also throwE
. The wrapping logic should not encounter any exception. I think this might have been a mistake during design or compilation.The text was updated successfully, but these errors were encountered: