1
0
mirror of synced 2026-08-04 17:27:13 +00:00

Polish diamond usage

This commit is contained in:
Tran Ngoc Nhan
2024-10-25 19:28:55 +07:00
committed by Josh Cummings
parent 9cb81f8ad5
commit ffed4ea1dc
9 changed files with 16 additions and 18 deletions
@@ -3696,7 +3696,7 @@ public final class HttpSecurity extends AbstractConfiguredSecurityBuilder<Defaul
* @throws Exception
*/
public HttpSecurity webAuthn(Customizer<WebAuthnConfigurer<HttpSecurity>> webAuthn) throws Exception {
webAuthn.customize(getOrApply(new WebAuthnConfigurer<HttpSecurity>()));
webAuthn.customize(getOrApply(new WebAuthnConfigurer<>()));
return HttpSecurity.this;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -179,8 +179,7 @@ public final class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>>
allMatcher.setUseEquals(true);
RequestMatcher notHtmlMatcher = new NegatedRequestMatcher(
new MediaTypeRequestMatcher(contentNegotiationStrategy, MediaType.TEXT_HTML));
RequestMatcher restNotHtmlMatcher = new AndRequestMatcher(
Arrays.<RequestMatcher>asList(notHtmlMatcher, restMatcher));
RequestMatcher restNotHtmlMatcher = new AndRequestMatcher(Arrays.asList(notHtmlMatcher, restMatcher));
RequestMatcher preferredMatcher = new OrRequestMatcher(
Arrays.asList(X_REQUESTED_WITH, restNotHtmlMatcher, allMatcher));
registerDefaultEntryPoint(http, preferredMatcher);
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -326,8 +326,7 @@ public final class OAuth2ResourceServerConfigurer<H extends HttpSecurityBuilder<
allMatcher.setUseEquals(true);
RequestMatcher notHtmlMatcher = new NegatedRequestMatcher(
new MediaTypeRequestMatcher(contentNegotiationStrategy, MediaType.TEXT_HTML));
RequestMatcher restNotHtmlMatcher = new AndRequestMatcher(
Arrays.<RequestMatcher>asList(notHtmlMatcher, restMatcher));
RequestMatcher restNotHtmlMatcher = new AndRequestMatcher(Arrays.asList(notHtmlMatcher, restMatcher));
RequestMatcher preferredMatcher = new OrRequestMatcher(
Arrays.asList(this.requestMatcher, X_REQUESTED_WITH, restNotHtmlMatcher, allMatcher));
exceptionHandling.defaultAuthenticationEntryPointFor(this.authenticationEntryPoint, preferredMatcher);
@@ -73,7 +73,7 @@ public class AuthenticationManagerFactoryBean implements FactoryBean<Authenticat
provider.setPasswordEncoder(passwordEncoder);
}
provider.afterPropertiesSet();
ProviderManager manager = new ProviderManager(Arrays.<AuthenticationProvider>asList(provider));
ProviderManager manager = new ProviderManager(Arrays.asList(provider));
if (this.observationRegistry.isNoop()) {
return manager;
}