1
0
mirror of synced 2026-08-04 09:17:02 +00:00

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
@@ -28,9 +28,6 @@ import org.springframework.security.core.AuthenticationException;
*/
public class AuthenticationCancelledException extends AuthenticationException {
// ~ Constructors
// ===================================================================================================
public AuthenticationCancelledException(String msg) {
super(msg);
}
@@ -55,18 +55,12 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
private static final String ATTRIBUTE_LIST_KEY = "SPRING_SECURITY_OPEN_ID_ATTRIBUTES_FETCH_LIST";
// ~ Instance fields
// ================================================================================================
protected final Log logger = LogFactory.getLog(getClass());
private final ConsumerManager consumerManager;
private final AxFetchListFactory attributesToFetchFactory;
// ~ Constructors
// ===================================================================================================
public OpenID4JavaConsumer() throws ConsumerException {
this(new ConsumerManager(), new NullAxFetchListFactory());
}
@@ -80,9 +74,6 @@ public class OpenID4JavaConsumer implements OpenIDConsumer {
this.attributesToFetchFactory = attributesToFetchFactory;
}
// ~ Methods
// ========================================================================================================
public String beginConsumption(HttpServletRequest req, String identityUrl, String returnToUrl, String realm)
throws OpenIDConsumerException {
List<DiscoveryInformation> discoveries;
@@ -71,14 +71,8 @@ import java.util.*;
*/
public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessingFilter {
// ~ Static fields/initializers
// =====================================================================================
public static final String DEFAULT_CLAIMED_IDENTITY_FIELD = "openid_identifier";
// ~ Instance fields
// ================================================================================================
private OpenIDConsumer consumer;
private String claimedIdentityFieldName = DEFAULT_CLAIMED_IDENTITY_FIELD;
@@ -87,16 +81,10 @@ public class OpenIDAuthenticationFilter extends AbstractAuthenticationProcessing
private Set<String> returnToUrlParameters = Collections.emptySet();
// ~ Constructors
// ===================================================================================================
public OpenIDAuthenticationFilter() {
super("/login/openid");
}
// ~ Methods
// ========================================================================================================
@Override
public void afterPropertiesSet() {
super.afterPropertiesSet();
@@ -53,16 +53,10 @@ import org.springframework.util.Assert;
*/
public class OpenIDAuthenticationProvider implements AuthenticationProvider, InitializingBean {
// ~ Instance fields
// ================================================================================================
private AuthenticationUserDetailsService<OpenIDAuthenticationToken> userDetailsService;
private GrantedAuthoritiesMapper authoritiesMapper = new NullAuthoritiesMapper();
// ~ Methods
// ========================================================================================================
public void afterPropertiesSet() {
Assert.notNull(this.userDetailsService, "The userDetailsService must be set");
}
@@ -47,9 +47,6 @@ public enum OpenIDAuthenticationStatus {
private final String name;
// ~ Constructors
// ===================================================================================================
OpenIDAuthenticationStatus(String name) {
this.name = name;
}
@@ -36,9 +36,6 @@ public class OpenIDAuthenticationToken extends AbstractAuthenticationToken {
private static final long serialVersionUID = SpringSecurityCoreVersion.SERIAL_VERSION_UID;
// ~ Instance fields
// ================================================================================================
private final OpenIDAuthenticationStatus status;
private final Object principal;
@@ -49,9 +46,6 @@ public class OpenIDAuthenticationToken extends AbstractAuthenticationToken {
private final List<OpenIDAttribute> attributes;
// ~ Constructors
// ===================================================================================================
public OpenIDAuthenticationToken(OpenIDAuthenticationStatus status, String identityUrl, String message,
List<OpenIDAttribute> attributes) {
super(new ArrayList<>(0));
@@ -81,9 +75,6 @@ public class OpenIDAuthenticationToken extends AbstractAuthenticationToken {
setAuthenticated(true);
}
// ~ Methods
// ========================================================================================================
/**
* Returns 'null' always, as no credentials are processed by the OpenID provider.
* @see org.springframework.security.core.Authentication#getCredentials()
@@ -26,9 +26,6 @@ package org.springframework.security.openid;
*/
public class OpenIDConsumerException extends Exception {
// ~ Constructors
// ===================================================================================================
public OpenIDConsumerException(String message) {
super(message);
}
@@ -26,9 +26,6 @@ import javax.servlet.http.HttpServletRequest;
*/
public class MockOpenIDConsumer implements OpenIDConsumer {
// ~ Instance fields
// ================================================================================================
private OpenIDAuthenticationToken token;
private String redirectUrl;
@@ -49,9 +46,6 @@ public class MockOpenIDConsumer implements OpenIDConsumer {
this.token = token;
}
// ~ Methods
// ========================================================================================================
public String beginConsumption(HttpServletRequest req, String claimedIdentity, String returnToUrl, String realm) {
return redirectUrl;
}
@@ -43,14 +43,8 @@ import org.springframework.security.core.userdetails.UserDetailsService;
*/
public class OpenIDAuthenticationProviderTests {
// ~ Static fields/initializers
// =====================================================================================
private static final String USERNAME = "user.acegiopenid.com";
// ~ Methods
// ========================================================================================================
/*
* Test method for
* 'org.springframework.security.authentication.openid.OpenIDAuthenticationProvider.