Skip to content

Commit 8e16dfc

Browse files
committed
Polish
1 parent f15cb7a commit 8e16dfc

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SecurityAutoConfigurationTests.java

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616

1717
package org.springframework.boot.autoconfigure.security;
1818

19-
import static org.junit.Assert.assertEquals;
20-
import static org.junit.Assert.assertNotNull;
21-
import static org.junit.Assert.assertTrue;
22-
import static org.junit.Assert.fail;
23-
2419
import java.util.List;
2520
import java.util.concurrent.atomic.AtomicReference;
2621

@@ -58,6 +53,11 @@
5853
import org.springframework.security.web.SecurityFilterChain;
5954
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
6055

56+
import static org.junit.Assert.assertEquals;
57+
import static org.junit.Assert.assertNotNull;
58+
import static org.junit.Assert.assertTrue;
59+
import static org.junit.Assert.fail;
60+
6161
/**
6262
* Tests for {@link SecurityAutoConfiguration}.
6363
*
@@ -291,21 +291,23 @@ protected static class SecurityCustomizer extends WebSecurityConfigurerAdapter {
291291
}
292292

293293
@Configuration
294-
protected static class WorkaroundSecurityCustomizer extends WebSecurityConfigurerAdapter {
294+
protected static class WorkaroundSecurityCustomizer extends
295+
WebSecurityConfigurerAdapter {
295296

296297
@Autowired
297298
private AuthenticationManagerBuilder builder;
298-
299+
299300
@SuppressWarnings("unused")
300301
private AuthenticationManager authenticationManager;
301-
302+
302303
@Override
303304
protected void configure(HttpSecurity http) throws Exception {
304-
authenticationManager = new AuthenticationManager() {
305+
this.authenticationManager = new AuthenticationManager() {
305306
@Override
306307
public Authentication authenticate(Authentication authentication)
307308
throws AuthenticationException {
308-
return builder.getOrBuild().authenticate(authentication);
309+
return WorkaroundSecurityCustomizer.this.builder.getOrBuild()
310+
.authenticate(authentication);
309311
}
310312
};
311313
}

0 commit comments

Comments
 (0)