Apply code cleanup rules to projects
Apply automated cleanup rules to add `@Override` and `@Deprecated` annotations and to fix class references used with static methods. Issue gh-8945
This commit is contained in:
@@ -179,6 +179,7 @@ public class LdapAuthenticationProviderTests {
|
||||
|
||||
class MockAuthenticator implements LdapAuthenticator {
|
||||
|
||||
@Override
|
||||
public DirContextOperations authenticate(Authentication authentication) {
|
||||
DirContextAdapter ctx = new DirContextAdapter();
|
||||
ctx.setAttributeValue("ou", "FROM_ENTRY");
|
||||
@@ -206,6 +207,7 @@ public class LdapAuthenticationProviderTests {
|
||||
|
||||
String username;
|
||||
|
||||
@Override
|
||||
public Collection<GrantedAuthority> getGrantedAuthorities(DirContextOperations userCtx, String username) {
|
||||
this.username = username;
|
||||
return AuthorityUtils.createAuthorityList("ROLE_FROM_POPULATOR");
|
||||
|
||||
@@ -33,6 +33,7 @@ public class MockUserSearch implements LdapUserSearch {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DirContextOperations searchForUser(String username) {
|
||||
return this.user;
|
||||
}
|
||||
|
||||
@@ -290,12 +290,14 @@ public class ActiveDirectoryLdapAuthenticationProviderTests {
|
||||
|
||||
private Matcher<String> causeDataCode = CoreMatchers.equalTo(dataCode);
|
||||
|
||||
@Override
|
||||
public boolean matches(Object that) {
|
||||
Throwable t = (Throwable) that;
|
||||
ActiveDirectoryAuthenticationException cause = (ActiveDirectoryAuthenticationException) t.getCause();
|
||||
return this.causeInstance.matches(cause) && this.causeDataCode.matches(cause.getDataCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void describeTo(Description desc) {
|
||||
desc.appendText("getCause() ");
|
||||
this.causeInstance.describeTo(desc);
|
||||
@@ -468,23 +470,28 @@ public class ActiveDirectoryLdapAuthenticationProviderTests {
|
||||
this.sr = sr;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResult next() {
|
||||
SearchResult result = this.sr;
|
||||
this.sr = null;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMore() {
|
||||
return this.sr != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasMoreElements() {
|
||||
return hasMore();
|
||||
}
|
||||
|
||||
@Override
|
||||
public SearchResult nextElement() {
|
||||
return next();
|
||||
}
|
||||
|
||||
@@ -74,6 +74,7 @@ public class LdapUserDetailsServiceTests {
|
||||
|
||||
class MockAuthoritiesPopulator implements LdapAuthoritiesPopulator {
|
||||
|
||||
@Override
|
||||
public Collection<GrantedAuthority> getGrantedAuthorities(DirContextOperations userCtx, String username) {
|
||||
return AuthorityUtils.createAuthorityList("ROLE_FROM_POPULATOR");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user