Skip to content

Commit d238794

Browse files
ngocnhan-tran1996jgrandja
authored andcommitted
Polish diamond operator
Closes gh-1848
1 parent 6d49c4c commit d238794

11 files changed

+21
-21
lines changed

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ protected final ObjectMapper getObjectMapper() {
614614

615615
private Map<String, Object> parseMap(String data) {
616616
try {
617-
return this.objectMapper.readValue(data, new TypeReference<Map<String, Object>>() {
617+
return this.objectMapper.readValue(data, new TypeReference<>() {
618618
});
619619
}
620620
catch (Exception ex) {

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/client/JdbcRegisteredClientRepository.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ protected final ObjectMapper getObjectMapper() {
309309

310310
private Map<String, Object> parseMap(String data) {
311311
try {
312-
return this.objectMapper.readValue(data, new TypeReference<Map<String, Object>>() {
312+
return this.objectMapper.readValue(data, new TypeReference<>() {
313313
});
314314
}
315315
catch (Exception ex) {

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/http/converter/OAuth2AuthorizationServerMetadataHttpMessageConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -49,7 +49,7 @@
4949
public class OAuth2AuthorizationServerMetadataHttpMessageConverter
5050
extends AbstractHttpMessageConverter<OAuth2AuthorizationServerMetadata> {
5151

52-
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<Map<String, Object>>() {
52+
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<>() {
5353
};
5454

5555
private final GenericHttpMessageConverter<Object> jsonMessageConverter = HttpMessageConverters

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/http/converter/OAuth2TokenIntrospectionHttpMessageConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -58,7 +58,7 @@
5858
public class OAuth2TokenIntrospectionHttpMessageConverter
5959
extends AbstractHttpMessageConverter<OAuth2TokenIntrospection> {
6060

61-
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<Map<String, Object>>() {
61+
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<>() {
6262
};
6363

6464
private final GenericHttpMessageConverter<Object> jsonMessageConverter = HttpMessageConverters

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/jackson2/JsonNodeUtils.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -30,10 +30,10 @@
3030
*/
3131
abstract class JsonNodeUtils {
3232

33-
static final TypeReference<Set<String>> STRING_SET = new TypeReference<Set<String>>() {
33+
static final TypeReference<Set<String>> STRING_SET = new TypeReference<>() {
3434
};
3535

36-
static final TypeReference<Map<String, Object>> STRING_OBJECT_MAP = new TypeReference<Map<String, Object>>() {
36+
static final TypeReference<Map<String, Object>> STRING_OBJECT_MAP = new TypeReference<>() {
3737
};
3838

3939
static String findStringValue(JsonNode jsonNode, String fieldName) {

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/OidcClientRegistrationHttpMessageConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -56,7 +56,7 @@
5656
*/
5757
public class OidcClientRegistrationHttpMessageConverter extends AbstractHttpMessageConverter<OidcClientRegistration> {
5858

59-
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<Map<String, Object>>() {
59+
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<>() {
6060
};
6161

6262
private final GenericHttpMessageConverter<Object> jsonMessageConverter = HttpMessageConverters

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/OidcProviderConfigurationHttpMessageConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -49,7 +49,7 @@
4949
public class OidcProviderConfigurationHttpMessageConverter
5050
extends AbstractHttpMessageConverter<OidcProviderConfiguration> {
5151

52-
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<Map<String, Object>>() {
52+
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<>() {
5353
};
5454

5555
private final GenericHttpMessageConverter<Object> jsonMessageConverter = HttpMessageConverters

Diff for: oauth2-authorization-server/src/main/java/org/springframework/security/oauth2/server/authorization/oidc/http/converter/OidcUserInfoHttpMessageConverter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2022 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -48,7 +48,7 @@
4848
*/
4949
public class OidcUserInfoHttpMessageConverter extends AbstractHttpMessageConverter<OidcUserInfo> {
5050

51-
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<Map<String, Object>>() {
51+
private static final ParameterizedTypeReference<Map<String, Object>> STRING_OBJECT_MAP = new ParameterizedTypeReference<>() {
5252
};
5353

5454
private final GenericHttpMessageConverter<Object> jsonMessageConverter = HttpMessageConverters

Diff for: oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/JdbcOAuth2AuthorizationServiceTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020-2023 the original author or authors.
2+
* Copyright 2020-2024 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.
@@ -756,7 +756,7 @@ public OAuth2Authorization mapRow(ResultSet rs, int rowNum) throws SQLException
756756

757757
private Map<String, Object> parseMap(String data) {
758758
try {
759-
return getObjectMapper().readValue(data, new TypeReference<Map<String, Object>>() {
759+
return getObjectMapper().readValue(data, new TypeReference<>() {
760760
});
761761
}
762762
catch (Exception ex) {

Diff for: oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/client/JdbcRegisteredClientRepositoryTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ public RegisteredClient mapRow(ResultSet rs, int rowNum) throws SQLException {
417417

418418
private Map<String, Object> parseMap(String data) {
419419
try {
420-
return this.objectMapper.readValue(data, new TypeReference<Map<String, Object>>() {
420+
return this.objectMapper.readValue(data, new TypeReference<>() {
421421
});
422422
}
423423
catch (Exception ex) {

Diff for: oauth2-authorization-server/src/test/java/org/springframework/security/oauth2/server/authorization/jackson2/OAuth2AuthorizationServerJackson2ModuleTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
*/
3838
public class OAuth2AuthorizationServerJackson2ModuleTests {
3939

40-
private static final TypeReference<Map<String, Object>> STRING_OBJECT_MAP = new TypeReference<Map<String, Object>>() {
40+
private static final TypeReference<Map<String, Object>> STRING_OBJECT_MAP = new TypeReference<>() {
4141
};
4242

43-
private static final TypeReference<Set<String>> STRING_SET = new TypeReference<Set<String>>() {
43+
private static final TypeReference<Set<String>> STRING_SET = new TypeReference<>() {
4444
};
4545

46-
private static final TypeReference<String[]> STRING_ARRAY = new TypeReference<String[]>() {
46+
private static final TypeReference<String[]> STRING_ARRAY = new TypeReference<>() {
4747
};
4848

4949
private ObjectMapper objectMapper;

0 commit comments

Comments
 (0)