diff --git a/docs/src/test/java/io/micrometer/docs/observation/ObservationTestingTests.java b/docs/src/test/java/io/micrometer/docs/observation/ObservationTestingTests.java index 1b2d76b18e..543cf94f2e 100644 --- a/docs/src/test/java/io/micrometer/docs/observation/ObservationTestingTests.java +++ b/docs/src/test/java/io/micrometer/docs/observation/ObservationTestingTests.java @@ -88,7 +88,7 @@ static class Example { } void run() { - final Observation observation = Observation.createNotStarted("foo", registry) + Observation observation = Observation.createNotStarted("foo", registry) .lowCardinalityKeyValue("lowTag", "lowTagValue") .highCardinalityKeyValue("highTag", "highTagValue"); observation.observe(() -> { diff --git a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistry.java b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistry.java index 456d7bd2dc..48bb0a42ef 100644 --- a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistry.java +++ b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistry.java @@ -121,7 +121,7 @@ public boolean supportsContext(Observation.Context context) { } @Override - public void onEvent(final Observation.Event event, final Observation.Context context) { + public void onEvent(Observation.Event event, Observation.Context context) { this.contexts.stream() .filter(testContext -> testContext.getContext() == context) .findFirst() diff --git a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java index 481e248799..1844556cef 100644 --- a/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java +++ b/micrometer-observation-test/src/main/java/io/micrometer/observation/tck/TestObservationRegistryAssert.java @@ -581,6 +581,7 @@ public TestObservationRegistryAssert backToTestObservationRegistry() { * @return this * @throws AssertionError if the {@link Observation} does not have an event with * the given name + * @since 1.15.0 */ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(String name) { isNotNull(); @@ -598,6 +599,7 @@ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(S * @return this * @throws AssertionError if the {@link Observation} does not have an event with * the given name and contextual name + * @since 1.15.0 */ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(String name, String contextualName) { @@ -616,6 +618,7 @@ public TestObservationRegistryAssertReturningObservationContextAssert hasEvent(S * @return this * @throws AssertionError if the {@link Observation} has an event with the given * name + * @since 1.15.0 */ public TestObservationRegistryAssertReturningObservationContextAssert doesNotHaveEvent(String name) { isNotNull(); @@ -629,10 +632,11 @@ public TestObservationRegistryAssertReturningObservationContextAssert doesNotHav * Verifies that the {@link Observation} does not have an event with the given * name and contextual name. * @param name event name - * @param contextualName contextual name@ + * @param contextualName contextual name * @return this * @throws AssertionError if the {@link Observation} has an event with the given * name and contextual name + * @since 1.15.0 */ public TestObservationRegistryAssertReturningObservationContextAssert doesNotHaveEvent(String name, String contextualName) {