Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void eachLogout(HttpServletRequest request, OidcBackChannelLogoutAuthent
}
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public BeanDefinitionHolder decorate(Node node, BeanDefinitionHolder holder, Par
}
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, ",");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ static void registerFilterChainProxyIfNecessary(ParserContext pc, Element elemen
// 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ else if (CSRF_HANDSHAKE_HANDLER_CLASSES.contains(beanClassName)) {
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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ void serializeAndDeserializeAreEqual(Class<?> clazz) throws Exception {
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]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public void requestWhenHeadersElementUsedThenResponseContainsAllSecureHeaders()

@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
Expand Down