Skip to content

Commit 733ee29

Browse files
Apply diamond operator
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent 42e24aa commit 733ee29

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

config/src/main/java/org/springframework/security/config/annotation/web/configurers/oauth2/client/OidcBackChannelLogoutHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -117,7 +117,7 @@ private void eachLogout(HttpServletRequest request, OidcBackChannelLogoutAuthent
117117
}
118118
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
119119
String logout = computeLogoutEndpoint(request, token);
120-
MultiValueMap<String, String> body = new LinkedMultiValueMap();
120+
MultiValueMap<String, String> body = new LinkedMultiValueMap<>();
121121
body.add("logout_token", token.getPrincipal().getTokenValue());
122122
body.add("_spring_security_internal_logout", "true");
123123
HttpEntity<?> entity = new HttpEntity<>(body, headers);

config/src/main/java/org/springframework/security/config/http/FilterChainMapBeanDefinitionDecorator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -64,7 +64,7 @@ public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder holder, Par
6464
}
6565
BeanDefinition matcher = matcherType.createMatcher(parserContext, path, null);
6666
if (filters.equals(HttpSecurityBeanDefinitionParser.OPT_FILTERS_NONE)) {
67-
securityFilterChains.add(createSecurityFilterChain(matcher, new ManagedList(0)));
67+
securityFilterChains.add(createSecurityFilterChain(matcher, new ManagedList<>(0)));
6868
}
6969
else {
7070
String[] filterBeanNames = StringUtils.tokenizeToStringArray(filters, ",");

config/src/main/java/org/springframework/security/config/http/HttpSecurityBeanDefinitionParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ static void registerFilterChainProxyIfNecessary(ParserContext pc, Element elemen
370370
// Not already registered, so register the list of filter chains and the
371371
// FilterChainProxy
372372
BeanDefinition listFactoryBean = new RootBeanDefinition(ListFactoryBean.class);
373-
listFactoryBean.getPropertyValues().add("sourceList", new ManagedList());
373+
listFactoryBean.getPropertyValues().add("sourceList", new ManagedList<>());
374374
pc.registerBeanComponent(new BeanComponentDefinition(listFactoryBean, BeanIds.FILTER_CHAINS));
375375
BeanDefinitionBuilder fcpBldr = BeanDefinitionBuilder.rootBeanDefinition(FilterChainProxy.class);
376376
fcpBldr.getRawBeanDefinition().setSource(source);

config/src/main/java/org/springframework/security/config/websocket/WebSocketMessageBrokerSecurityBeanDefinitionParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -361,7 +361,7 @@ else if (CSRF_HANDSHAKE_HANDLER_CLASSES.contains(beanClassName)) {
361361
if (!registry.containsBeanDefinition(CLIENT_INBOUND_CHANNEL_BEAN_ID)) {
362362
return;
363363
}
364-
ManagedList<Object> interceptors = new ManagedList();
364+
ManagedList<Object> interceptors = new ManagedList<>();
365365
interceptors.add(new RootBeanDefinition(SecurityContextChannelInterceptor.class));
366366
if (!this.sameOriginDisabled) {
367367
interceptors.add(new RootBeanDefinition(CsrfChannelInterceptor.class));

config/src/test/java/org/springframework/security/SpringSecurityCoreVersionSerializableTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ void serializeAndDeserializeAreEqual(Class<?> clazz) throws Exception {
9191
Object deserialized = objectInputStream.readObject();
9292
// Ignore transient fields Event classes extend from EventObject which has
9393
// transient source property
94-
Set<String> transientFieldNames = new HashSet();
95-
Set<Class<?>> visitedClasses = new HashSet();
94+
Set<String> transientFieldNames = new HashSet<>();
95+
Set<Class<?>> visitedClasses = new HashSet<>();
9696
collectTransientFieldNames(transientFieldNames, visitedClasses, clazz);
9797
assertThat(deserialized).usingRecursiveComparison()
9898
.ignoringFields(transientFieldNames.toArray(new String[0]))

config/src/test/java/org/springframework/security/config/http/HttpHeadersConfigTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -152,7 +152,7 @@ public void requestWhenHeadersElementUsedThenResponseContainsAllSecureHeaders()
152152

153153
@Test
154154
public void requestWhenFrameOptionsConfiguredThenIncludesHeader() throws Exception {
155-
Map<String, String> headers = new HashMap(defaultHeaders);
155+
Map<String, String> headers = new HashMap<>(defaultHeaders);
156156
headers.put("X-Frame-Options", "SAMEORIGIN");
157157
this.spring.configLocations(this.xml("WithFrameOptions")).autowire();
158158
// @formatter:off

0 commit comments

Comments
 (0)