mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-10-23 10:48:51 +00:00
Apply Diamond Operator
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
parent
bd98db4fe8
commit
d6e378e9bb
@ -117,7 +117,7 @@ public final class OidcBackChannelLogoutHandler implements LogoutHandler {
|
||||
}
|
||||
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
|
||||
String logout = computeLogoutEndpoint(request, token);
|
||||
MultiValueMap<String, String> body = new LinkedMultiValueMap();
|
||||
MultiValueMap<String, String> body = new LinkedMultiValueMap<>();
|
||||
body.add("logout_token", token.getPrincipal().getTokenValue());
|
||||
body.add("_spring_security_internal_logout", "true");
|
||||
HttpEntity<?> entity = new HttpEntity<>(body, headers);
|
||||
|
@ -64,7 +64,7 @@ public class FilterChainMapBeanDefinitionDecorator implements BeanDefinitionDeco
|
||||
}
|
||||
BeanDefinition matcher = matcherType.createMatcher(parserContext, path, null);
|
||||
if (filters.equals(HttpSecurityBeanDefinitionParser.OPT_FILTERS_NONE)) {
|
||||
securityFilterChains.add(createSecurityFilterChain(matcher, new ManagedList(0)));
|
||||
securityFilterChains.add(createSecurityFilterChain(matcher, new ManagedList<>(0)));
|
||||
}
|
||||
else {
|
||||
String[] filterBeanNames = StringUtils.tokenizeToStringArray(filters, ",");
|
||||
|
@ -370,7 +370,7 @@ public class HttpSecurityBeanDefinitionParser implements BeanDefinitionParser {
|
||||
// Not already registered, so register the list of filter chains and the
|
||||
// FilterChainProxy
|
||||
BeanDefinition listFactoryBean = new RootBeanDefinition(ListFactoryBean.class);
|
||||
listFactoryBean.getPropertyValues().add("sourceList", new ManagedList());
|
||||
listFactoryBean.getPropertyValues().add("sourceList", new ManagedList<>());
|
||||
pc.registerBeanComponent(new BeanComponentDefinition(listFactoryBean, BeanIds.FILTER_CHAINS));
|
||||
BeanDefinitionBuilder fcpBldr = BeanDefinitionBuilder.rootBeanDefinition(FilterChainProxy.class);
|
||||
fcpBldr.getRawBeanDefinition().setSource(source);
|
||||
|
@ -354,7 +354,7 @@ public final class WebSocketMessageBrokerSecurityBeanDefinitionParser implements
|
||||
if (!registry.containsBeanDefinition(CLIENT_INBOUND_CHANNEL_BEAN_ID)) {
|
||||
return;
|
||||
}
|
||||
ManagedList<Object> interceptors = new ManagedList();
|
||||
ManagedList<Object> interceptors = new ManagedList<>();
|
||||
interceptors.add(new RootBeanDefinition(SecurityContextChannelInterceptor.class));
|
||||
if (!this.sameOriginDisabled) {
|
||||
if (!registry.containsBeanDefinition(CSRF_CHANNEL_INTERCEPTOR_BEAN_ID)) {
|
||||
|
@ -91,8 +91,8 @@ class SpringSecurityCoreVersionSerializableTests {
|
||||
Object deserialized = objectInputStream.readObject();
|
||||
// Ignore transient fields Event classes extend from EventObject which has
|
||||
// transient source property
|
||||
Set<String> transientFieldNames = new HashSet();
|
||||
Set<Class<?>> visitedClasses = new HashSet();
|
||||
Set<String> transientFieldNames = new HashSet<>();
|
||||
Set<Class<?>> visitedClasses = new HashSet<>();
|
||||
collectTransientFieldNames(transientFieldNames, visitedClasses, clazz);
|
||||
assertThat(deserialized).usingRecursiveComparison()
|
||||
.ignoringFields(transientFieldNames.toArray(new String[0]))
|
||||
|
@ -152,7 +152,7 @@ public class HttpHeadersConfigTests {
|
||||
|
||||
@Test
|
||||
public void requestWhenFrameOptionsConfiguredThenIncludesHeader() throws Exception {
|
||||
Map<String, String> headers = new HashMap(defaultHeaders);
|
||||
Map<String, String> headers = new HashMap<>(defaultHeaders);
|
||||
headers.put("X-Frame-Options", "SAMEORIGIN");
|
||||
this.spring.configLocations(this.xml("WithFrameOptions")).autowire();
|
||||
// @formatter:off
|
||||
|
Loading…
x
Reference in New Issue
Block a user