Skip to content

Commit c38e57f

Browse files
xak2000eleftherias
authored andcommitted
Fix class and variable names
1 parent 8ebc7ca commit c38e57f

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/InitializeAuthenticationProviderBeanManagerConfigurer.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2019 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,7 +19,6 @@
1919
import org.springframework.core.annotation.Order;
2020
import org.springframework.security.authentication.AuthenticationProvider;
2121
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
22-
import org.springframework.security.crypto.password.PasswordEncoder;
2322

2423
/**
2524
* Lazily initializes the global authentication with an {@link AuthenticationProvider} if it is
@@ -47,10 +46,10 @@ class InitializeAuthenticationProviderBeanManagerConfigurer
4746

4847
@Override
4948
public void init(AuthenticationManagerBuilder auth) throws Exception {
50-
auth.apply(new InitializeUserDetailsManagerConfigurer());
49+
auth.apply(new InitializeAuthenticationProviderManagerConfigurer());
5150
}
5251

53-
class InitializeUserDetailsManagerConfigurer
52+
class InitializeAuthenticationProviderManagerConfigurer
5453
extends GlobalAuthenticationConfigurerAdapter {
5554
@Override
5655
public void configure(AuthenticationManagerBuilder auth) {
@@ -68,17 +67,17 @@ public void configure(AuthenticationManagerBuilder auth) {
6867
}
6968

7069
/**
71-
* @return
70+
* @return a bean of the requested class if there's just a single registered component, null otherwise.
7271
*/
7372
private <T> T getBeanOrNull(Class<T> type) {
74-
String[] userDetailsBeanNames = InitializeAuthenticationProviderBeanManagerConfigurer.this.context
73+
String[] beanNames = InitializeAuthenticationProviderBeanManagerConfigurer.this.context
7574
.getBeanNamesForType(type);
76-
if (userDetailsBeanNames.length != 1) {
75+
if (beanNames.length != 1) {
7776
return null;
7877
}
7978

8079
return InitializeAuthenticationProviderBeanManagerConfigurer.this.context
81-
.getBean(userDetailsBeanNames[0], type);
80+
.getBean(beanNames[0], type);
8281
}
8382
}
8483
}

config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ public void configure(AuthenticationManagerBuilder auth) throws Exception {
8585
* @return a bean of the requested class if there's just a single registered component, null otherwise.
8686
*/
8787
private <T> T getBeanOrNull(Class<T> type) {
88-
String[] userDetailsBeanNames = InitializeUserDetailsBeanManagerConfigurer.this.context
88+
String[] beanNames = InitializeUserDetailsBeanManagerConfigurer.this.context
8989
.getBeanNamesForType(type);
90-
if (userDetailsBeanNames.length != 1) {
90+
if (beanNames.length != 1) {
9191
return null;
9292
}
9393

9494
return InitializeUserDetailsBeanManagerConfigurer.this.context
95-
.getBean(userDetailsBeanNames[0], type);
95+
.getBean(beanNames[0], type);
9696
}
9797
}
9898
}

0 commit comments

Comments
 (0)