Format ObservationConvention Configuration

Issue gh-12534
This commit is contained in:
Josh Cummings 2023-03-27 17:01:59 -06:00
parent 8d933fcb03
commit f1b14de3ba
8 changed files with 21 additions and 22 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -59,7 +59,6 @@ public final class ObservationAuthenticationManager implements AuthenticationMan
/**
* Use the provided convention for reporting observation data
*
* @param convention The provided convention
*
* @since 6.1
@ -68,4 +67,5 @@ public final class ObservationAuthenticationManager implements AuthenticationMan
Assert.notNull(convention, "The observation convention cannot be null");
this.convention = convention;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,11 +20,11 @@ import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationConvention;
import io.micrometer.observation.ObservationRegistry;
import io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor;
import org.springframework.util.Assert;
import reactor.core.publisher.Mono;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.util.Assert;
/**
* An {@link ReactiveAuthenticationManager} that observes the authentication
@ -66,7 +66,6 @@ public class ObservationReactiveAuthenticationManager implements ReactiveAuthent
/**
* Use the provided convention for reporting observation data
*
* @param convention The provided convention
*
* @since 6.1
@ -75,4 +74,5 @@ public class ObservationReactiveAuthenticationManager implements ReactiveAuthent
Assert.notNull(convention, "The observation convention cannot be null");
this.convention = convention;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -72,7 +72,6 @@ public final class ObservationAuthorizationManager<T> implements AuthorizationMa
/**
* Use the provided convention for reporting observation data
*
* @param convention The provided convention
*
* @since 6.1
@ -81,4 +80,5 @@ public final class ObservationAuthorizationManager<T> implements AuthorizationMa
Assert.notNull(convention, "The observation convention cannot be null");
this.convention = convention;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,11 +20,11 @@ import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationConvention;
import io.micrometer.observation.ObservationRegistry;
import io.micrometer.observation.contextpropagation.ObservationThreadLocalAccessor;
import org.springframework.util.Assert;
import reactor.core.publisher.Mono;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.core.Authentication;
import org.springframework.util.Assert;
/**
* An {@link ReactiveAuthorizationManager} that observes the authentication
@ -71,7 +71,6 @@ public final class ObservationReactiveAuthorizationManager<T> implements Reactiv
/**
* Use the provided convention for reporting observation data
*
* @param convention The provided convention
*
* @since 6.1
@ -80,4 +79,5 @@ public final class ObservationReactiveAuthorizationManager<T> implements Reactiv
Assert.notNull(convention, "The observation convention cannot be null");
this.convention = convention;
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -95,7 +95,7 @@ public class ObservationAuthenticationManagerTests {
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -98,8 +98,7 @@ public class ObservationReactiveAuthenticationManagerTests {
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -120,7 +120,7 @@ public class ObservationAuthorizationManagerTests {
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
}
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -119,7 +119,7 @@ public class ObservationReactiveAuthorizationManagerTests {
@Test
void conventionSetterThrowsWhenNull() {
assertThatExceptionOfType(IllegalArgumentException.class)
.isThrownBy(() -> this.tested.setConvention(null));
assertThatExceptionOfType(IllegalArgumentException.class).isThrownBy(() -> this.tested.setConvention(null));
}
}