Skip to content

Commit

Permalink
Polish "Take Supplier<Context> instead of Context" (#3487)
Browse files Browse the repository at this point in the history
  • Loading branch information
izeye authored Oct 12, 2022
1 parent e904ffd commit 3e16a68
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static Observation start(ObservationConvention<Context> observationConvention, O
* returned.
* @param <T> type of context
* @param observationConvention observation convention
* @param contextSupplier mutable context
* @param contextSupplier mutable context supplier
* @param registry observation registry
* @return started observation
*/
Expand All @@ -215,7 +215,7 @@ static <T extends Context> Observation start(ObservationConvention<T> observatio
* was found.
* @param <T> type of context
* @param registry observation registry
* @param contextSupplier the observation context
* @param contextSupplier the observation context supplier
* @param customConvention custom convention. If {@code null}, the default one will be
* picked.
* @param defaultConvention default convention when no custom convention was passed,
Expand Down Expand Up @@ -248,7 +248,8 @@ static Observation createNotStarted(ObservationConvention<Context> observationCo
* no-op {@link Observation} and skips the creation of the
* {@link Observation.Context}. This check avoids unnecessary
* {@link Observation.Context} creation, which is why it takes a {@link Supplier} for
* the context rather than the context directly. If the observation is not enabled(see
* the context rather than the context directly. If the observation is not enabled
* (see
* {@link ObservationRegistry.ObservationConfig#observationPredicate(ObservationPredicate)
* ObservationConfig#observationPredicate}), a no-op observation will also be
* returned.
Expand All @@ -263,7 +264,7 @@ static Observation createNotStarted(ObservationConvention<Context> observationCo
* </p>
* @param <T> type of context
* @param observationConvention observation convention
* @param contextSupplier mutable context
* @param contextSupplier mutable context supplier
* @param registry observation registry
* @return created but not started observation
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ default Observation observation(ObservationRegistry registry, Supplier<Observati
* @param defaultConvention default convention that will be picked if there was
* neither custom convention nor a pre-configured one via
* {@link ObservationRegistry.ObservationConfig#observationConvention(GlobalObservationConvention)}
* @param contextSupplier observation context
* @param contextSupplier observation context supplier
* @param registry observation registry
* @return observation
*/
Expand Down

0 comments on commit 3e16a68

Please sign in to comment.