Remove superfluous comments

Use '^\s+//\ \~\ .*$' and '^\s+//\ ============+$' regular expression
searches to remove superfluous comments.

Prior to this commit, many classes would have comments to indicate
blocks of code (such as constructors/methods/instance fields). These
added a lot of noise and weren't all that helpful, especially given
the outline views available in most modern IDEs.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-07-23 15:09:07 -07:00
committed by Rob Winch
parent b7fc18262d
commit 71bc145ae4
406 changed files with 12 additions and 2190 deletions

View File

@@ -31,9 +31,6 @@ import org.junit.Test;
*/
public class LdapUtilsTests {
// ~ Methods
// ========================================================================================================
@Test
public void testCloseContextSwallowsNamingException() throws Exception {
final DirContext dirCtx = mock(DirContext.class);

View File

@@ -46,9 +46,6 @@ import org.springframework.security.ldap.userdetails.LdapUserDetailsMapper;
*/
public class LdapAuthenticationProviderTests {
// ~ Methods
// ========================================================================================================
@Test
public void testSupportsUsernamePasswordAuthenticationToken() {
LdapAuthenticationProvider ldapProvider = new LdapAuthenticationProvider(new MockAuthenticator(),
@@ -177,9 +174,6 @@ public class LdapAuthenticationProviderTests {
}
}
// ~ Inner Classes
// ==================================================================================================
class MockAuthenticator implements LdapAuthenticator {
public DirContextOperations authenticate(Authentication authentication) {

View File

@@ -25,14 +25,8 @@ import org.springframework.ldap.core.DirContextOperations;
*/
public class MockUserSearch implements LdapUserSearch {
// ~ Instance fields
// ================================================================================================
DirContextOperations user;
// ~ Constructors
// ===================================================================================================
public MockUserSearch() {
}
@@ -40,9 +34,6 @@ public class MockUserSearch implements LdapUserSearch {
this.user = user;
}
// ~ Methods
// ========================================================================================================
public DirContextOperations searchForUser(String username) {
return user;
}

View File

@@ -33,9 +33,6 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
*/
public class PasswordComparisonAuthenticatorMockTests {
// ~ Methods
// ========================================================================================================
@Test
public void ldapCompareOperationIsUsedWhenPasswordIsNotRetrieved() throws Exception {
final DirContext dirCtx = mock(DirContext.class);

View File

@@ -27,9 +27,6 @@ import org.junit.Test;
*/
public class PasswordPolicyResponseControlTests {
// ~ Methods
// ========================================================================================================
/**
* Useful method for obtaining data from a server for use in tests
*/