1
0
mirror of synced 2026-08-06 02:08:01 +00:00

Remove (non-Javadoc) comments

Search and replace using '(?s)/\*\s*\* \(non-Javadoc\).*?\*/' to remove
all "(non-Javadoc)" comments. These comments used to be added
automatically by Eclipse, but are not really necessary.

Issue gh-8945
This commit is contained in:
Phillip Webb
2020-08-05 19:55:36 -07:00
committed by Rob Winch
parent a2f2e9ac8d
commit 3e700e7571
42 changed files with 1 additions and 425 deletions
@@ -27,13 +27,6 @@ import javax.servlet.http.HttpSession;
*/
public final class ChangeSessionIdAuthenticationStrategy extends AbstractSessionFixationProtectionStrategy {
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.authentication.session.
* AbstractSessionFixationProtectionStrategy
* #applySessionFixation(javax.servlet.http.HttpServletRequest)
*/
@Override
HttpSession applySessionFixation(HttpServletRequest request) {
request.changeSessionId();
@@ -70,14 +70,6 @@ public class CompositeSessionAuthenticationStrategy implements SessionAuthentica
this.delegateStrategies = delegateStrategies;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.authentication.session.
* SessionAuthenticationStrategy
* #onAuthentication(org.springframework.security.core.Authentication,
* javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void onAuthentication(Authentication authentication, HttpServletRequest request,
HttpServletResponse response) throws SessionAuthenticationException {
@@ -86,26 +86,11 @@ import org.springframework.web.method.support.ModelAndViewContainer;
@Deprecated
public final class AuthenticationPrincipalArgumentResolver implements HandlerMethodArgumentResolver {
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* supportsParameter (org.springframework.core.MethodParameter)
*/
@Override
public boolean supportsParameter(MethodParameter parameter) {
return findMethodAnnotation(AuthenticationPrincipal.class, parameter) != null;
}
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* resolveArgument (org.springframework.core.MethodParameter,
* org.springframework.web.method.support.ModelAndViewContainer,
* org.springframework.web.context.request.NativeWebRequest,
* org.springframework.web.bind.support.WebDataBinderFactory)
*/
@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {
@@ -99,12 +99,6 @@ public abstract class AbstractSecurityWebApplicationInitializer implements WebAp
this.configurationClasses = configurationClasses;
}
/*
* (non-Javadoc)
*
* @see org.springframework.web.WebApplicationInitializer#onStartup(javax.servlet.
* ServletContext)
*/
@Override
public final void onStartup(ServletContext servletContext) {
beforeSpringSecurityFilterChain(servletContext);
@@ -44,14 +44,6 @@ public final class CsrfAuthenticationStrategy implements SessionAuthenticationSt
this.csrfTokenRepository = csrfTokenRepository;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.authentication.session.
* SessionAuthenticationStrategy
* #onAuthentication(org.springframework.security.core.Authentication,
* javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void onAuthentication(Authentication authentication, HttpServletRequest request,
HttpServletResponse response) throws SessionAuthenticationException {
@@ -94,14 +94,6 @@ public final class CsrfFilter extends OncePerRequestFilter {
return TRUE.equals(request.getAttribute(SHOULD_NOT_FILTER));
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.web.filter.OncePerRequestFilter#doFilterInternal(javax.servlet
* .http.HttpServletRequest, javax.servlet.http.HttpServletResponse,
* javax.servlet.FilterChain)
*/
@Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain)
throws ServletException, IOException {
@@ -181,13 +173,6 @@ public final class CsrfFilter extends OncePerRequestFilter {
private final HashSet<String> allowedMethods = new HashSet<>(Arrays.asList("GET", "HEAD", "TRACE", "OPTIONS"));
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.util.matcher.RequestMatcher#matches(javax.
* servlet.http.HttpServletRequest)
*/
@Override
public boolean matches(HttpServletRequest request) {
return !this.allowedMethods.contains(request.getMethod());
@@ -48,31 +48,16 @@ public final class DefaultCsrfToken implements CsrfToken {
this.token = token;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getHeaderName()
*/
@Override
public String getHeaderName() {
return this.headerName;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getParameterName()
*/
@Override
public String getParameterName() {
return this.parameterName;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getToken()
*/
@Override
public String getToken() {
return this.token;
@@ -45,13 +45,6 @@ public final class HttpSessionCsrfTokenRepository implements CsrfTokenRepository
private String sessionAttributeName = DEFAULT_CSRF_TOKEN_ATTR_NAME;
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfTokenRepository#saveToken(org.
* springframework .security.web.csrf.CsrfToken,
* javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void saveToken(CsrfToken token, HttpServletRequest request, HttpServletResponse response) {
if (token == null) {
@@ -66,13 +59,6 @@ public final class HttpSessionCsrfTokenRepository implements CsrfTokenRepository
}
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.csrf.CsrfTokenRepository#loadToken(javax.servlet
* .http.HttpServletRequest)
*/
@Override
public CsrfToken loadToken(HttpServletRequest request) {
HttpSession session = request.getSession(false);
@@ -82,12 +68,6 @@ public final class HttpSessionCsrfTokenRepository implements CsrfTokenRepository
return (CsrfToken) session.getAttribute(this.sessionAttributeName);
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfTokenRepository#generateToken(javax.
* servlet .http.HttpServletRequest)
*/
@Override
public CsrfToken generateToken(HttpServletRequest request) {
return new DefaultCsrfToken(this.headerName, this.parameterName, createNewToken());
@@ -120,12 +120,6 @@ public class HeaderWriterFilter extends OncePerRequestFilter {
this.request = request;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.util.OnCommittedResponseWrapper#
* onResponseCommitted()
*/
@Override
protected void onResponseCommitted() {
writeHeaders();
@@ -49,13 +49,6 @@ public final class DelegatingRequestMatcherHeaderWriter implements HeaderWriter
this.delegateHeaderWriter = delegateHeaderWriter;
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.headers.HeaderWriter#writeHeaders(javax.servlet
* .http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
if (this.requestMatcher.matches(request)) {
@@ -171,12 +171,6 @@ public final class HpkpHeaderWriter implements HeaderWriter {
this(DEFAULT_MAX_AGE_SECONDS);
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.headers.HeaderWriter#writeHeaders(javax
* .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
if (this.requestMatcher.matches(request)) {
@@ -145,12 +145,6 @@ public final class HstsHeaderWriter implements HeaderWriter {
this(DEFAULT_MAX_AGE_SECONDS);
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.headers.HeaderWriter#writeHeaders(javax
* .servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
*/
@Override
public void writeHeaders(HttpServletRequest request, HttpServletResponse response) {
if (this.requestMatcher.matches(request)) {
@@ -90,26 +90,11 @@ public final class AuthenticationPrincipalArgumentResolver implements HandlerMet
private BeanResolver beanResolver;
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* supportsParameter (org.springframework.core.MethodParameter)
*/
@Override
public boolean supportsParameter(MethodParameter parameter) {
return findMethodAnnotation(AuthenticationPrincipal.class, parameter) != null;
}
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* resolveArgument (org.springframework.core.MethodParameter,
* org.springframework.web.method.support.ModelAndViewContainer,
* org.springframework.web.context.request.NativeWebRequest,
* org.springframework.web.bind.support.WebDataBinderFactory)
*/
@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {
@@ -44,26 +44,11 @@ import org.springframework.web.method.support.ModelAndViewContainer;
*/
public final class CsrfTokenArgumentResolver implements HandlerMethodArgumentResolver {
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* supportsParameter (org.springframework.core.MethodParameter)
*/
@Override
public boolean supportsParameter(MethodParameter parameter) {
return CsrfToken.class.equals(parameter.getParameterType());
}
/*
* (non-Javadoc)
*
* @see org.springframework.web.method.support.HandlerMethodArgumentResolver#
* resolveArgument (org.springframework.core.MethodParameter,
* org.springframework.web.method.support.ModelAndViewContainer,
* org.springframework.web.context.request.NativeWebRequest,
* org.springframework.web.bind.support.WebDataBinderFactory)
*/
@Override
public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer,
NativeWebRequest webRequest, WebDataBinderFactory binderFactory) {
@@ -48,31 +48,16 @@ public final class DefaultCsrfToken implements CsrfToken {
this.token = token;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getHeaderName()
*/
@Override
public String getHeaderName() {
return this.headerName;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getParameterName()
*/
@Override
public String getParameterName() {
return this.parameterName;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.csrf.CsrfToken#getToken()
*/
@Override
public String getToken() {
return this.token;
@@ -37,13 +37,6 @@ public class StaticServerHttpHeadersWriter implements ServerHttpHeadersWriter {
this.headersToAdd = headersToAdd;
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.server.HttpHeadersWriter#writeHttpHeaders(org.
* springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) {
HttpHeaders headers = exchange.getResponse().getHeaders();
@@ -49,13 +49,6 @@ public final class StrictTransportSecurityServerHttpHeadersWriter implements Ser
updateDelegate();
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.server.HttpHeadersWriter#writeHttpHeaders(org.
* springframework.http.HttpHeaders)
*/
@Override
public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) {
return isSecure(exchange) ? this.delegate.writeHttpHeaders(exchange) : Mono.empty();
@@ -31,12 +31,6 @@ public class XFrameOptionsServerHttpHeadersWriter implements ServerHttpHeadersWr
private ServerHttpHeadersWriter delegate = createDelegate(Mode.DENY);
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.server.HttpHeadersWriter#
* writeHttpHeaders(org.springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) {
return this.delegate.writeHttpHeaders(exchange);
@@ -44,13 +44,6 @@ public class XXssProtectionServerHttpHeadersWriter implements ServerHttpHeadersW
updateDelegate();
}
/*
* (non-Javadoc)
*
* @see
* org.springframework.security.web.server.HttpHeadersWriter#writeHttpHeaders(org.
* springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<Void> writeHttpHeaders(ServerWebExchange exchange) {
return this.delegate.writeHttpHeaders(exchange);
@@ -51,12 +51,6 @@ public class AndServerWebExchangeMatcher implements ServerWebExchangeMatcher {
this(Arrays.asList(matchers));
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher#
* matches(org.springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<MatchResult> matches(ServerWebExchange exchange) {
return Mono.defer(() -> {
@@ -41,12 +41,6 @@ public class NegatedServerWebExchangeMatcher implements ServerWebExchangeMatcher
this.matcher = matcher;
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher#
* matches(org.springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<MatchResult> matches(ServerWebExchange exchange) {
return this.matcher.matches(exchange).flatMap(m -> m.isMatch() ? MatchResult.notMatch() : MatchResult.match())
@@ -49,12 +49,6 @@ public class OrServerWebExchangeMatcher implements ServerWebExchangeMatcher {
this(Arrays.asList(matchers));
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher#
* matches(org.springframework.web.server.ServerWebExchange)
*/
@Override
public Mono<MatchResult> matches(ServerWebExchange exchange) {
return Flux.fromIterable(this.matchers).doOnNext(it -> {
@@ -87,12 +87,6 @@ public class MvcRequestMatcher implements RequestMatcher, RequestVariablesExtrac
}
}
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.util.matcher.RequestVariablesExtractor#
* extractUriTemplateVariables(javax.servlet.http.HttpServletRequest)
*/
@Override
@Deprecated
public Map<String, String> extractUriTemplateVariables(HttpServletRequest request) {
@@ -251,13 +251,7 @@ public class ConcurrentSessionFilterTests {
final String expiredUrl = "/expired";
ConcurrentSessionFilter filter = new ConcurrentSessionFilter(registry, expiredUrl + "will-be-overrridden") {
/*
* (non-Javadoc)
*
* @see org.springframework.security.web.session.ConcurrentSessionFilter#
* determineExpiredUrl(javax.servlet.http.HttpServletRequest,
* org.springframework.security.core.session.SessionInformation)
*/
@Override
protected String determineExpiredUrl(HttpServletRequest request, SessionInformation info) {
return expiredUrl;