浏览代码

Format ObservationConvention Configuration

Issue gh-12534
Josh Cummings 2 年之前
父节点
当前提交
f1b14de3ba

+ 2 - 2
core/src/main/java/org/springframework/security/authentication/ObservationAuthenticationManager.java

@@ -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;
 	}
+
 }

+ 3 - 3
core/src/main/java/org/springframework/security/authentication/ObservationReactiveAuthenticationManager.java

@@ -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;
 	}
+
 }

+ 2 - 2
core/src/main/java/org/springframework/security/authorization/ObservationAuthorizationManager.java

@@ -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;
 	}
+
 }

+ 3 - 3
core/src/main/java/org/springframework/security/authorization/ObservationReactiveAuthorizationManager.java

@@ -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;
 	}
+
 }

+ 3 - 3
core/src/test/java/org/springframework/security/authentication/ObservationAuthenticationManagerTests.java

@@ -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));
 	}
+
 }

+ 2 - 3
core/src/test/java/org/springframework/security/authentication/ObservationReactiveAuthenticationManagerTests.java

@@ -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));
 	}
 
 }

+ 3 - 3
core/src/test/java/org/springframework/security/authorization/ObservationAuthorizationManagerTests.java

@@ -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));
 	}
+
 }

+ 3 - 3
core/src/test/java/org/springframework/security/authorization/ObservationReactiveAuthorizationManagerTests.java

@@ -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));
 	}
+
 }