Cleanup explicit type arguments

This commit is contained in:
Lars Grefer
2019-07-04 19:08:54 +02:00
committed by Rob Winch
parent c5b5cc507c
commit 3ea9d376b2
50 changed files with 68 additions and 68 deletions

View File

@@ -176,7 +176,7 @@ public class RoleHierarchyImpl implements RoleHierarchy {
* will become a key that references a set of the reachable lower roles.
*/
private void buildRolesReachableInOneStepMap() {
this.rolesReachableInOneStepMap = new HashMap<GrantedAuthority, Set<GrantedAuthority>>();
this.rolesReachableInOneStepMap = new HashMap<>();
try (BufferedReader bufferedReader = new BufferedReader(
new StringReader(this.roleHierarchyStringRepresentation))) {
for (String readLine; (readLine = bufferedReader.readLine()) != null;) {
@@ -187,7 +187,7 @@ public class RoleHierarchyImpl implements RoleHierarchy {
GrantedAuthority lowerRole = new SimpleGrantedAuthority(roles[i].replaceAll("^\\s+|\\s+$", ""));
Set<GrantedAuthority> rolesReachableInOneStepSet;
if (!this.rolesReachableInOneStepMap.containsKey(higherRole)) {
rolesReachableInOneStepSet = new HashSet<GrantedAuthority>();
rolesReachableInOneStepSet = new HashSet<>();
this.rolesReachableInOneStepMap.put(higherRole, rolesReachableInOneStepSet);
} else {
rolesReachableInOneStepSet = this.rolesReachableInOneStepMap.get(higherRole);

View File

@@ -42,7 +42,7 @@ public final class DelegatingMethodSecurityMetadataSource extends
.emptyList();
private final List<MethodSecurityMetadataSource> methodSecurityMetadataSources;
private final Map<DefaultCacheKey, Collection<ConfigAttribute>> attributeCache = new HashMap<DefaultCacheKey, Collection<ConfigAttribute>>();
private final Map<DefaultCacheKey, Collection<ConfigAttribute>> attributeCache = new HashMap<>();
// ~ Constructor
// ====================================================================================================

View File

@@ -63,7 +63,7 @@ public class DefaultAuthenticationEventPublisher implements AuthenticationEventP
private final Log logger = LogFactory.getLog(getClass());
private ApplicationEventPublisher applicationEventPublisher;
private final HashMap<String, Constructor<? extends AbstractAuthenticationEvent>> exceptionMappings = new HashMap<String, Constructor<? extends AbstractAuthenticationEvent>>();
private final HashMap<String, Constructor<? extends AbstractAuthenticationEvent>> exceptionMappings = new HashMap<>();
public DefaultAuthenticationEventPublisher() {
this(null);

View File

@@ -131,7 +131,7 @@ public class DelegatingSecurityContextExecutorService extends
if (tasks == null) {
return null;
}
List<Callable<T>> results = new ArrayList<Callable<T>>(tasks.size());
List<Callable<T>> results = new ArrayList<>(tasks.size());
for (Callable<T> task : tasks) {
results.add(wrap(task));
}
@@ -141,4 +141,4 @@ public class DelegatingSecurityContextExecutorService extends
private ExecutorService getDelegate() {
return (ExecutorService) getDelegateExecutor();
}
}
}

View File

@@ -88,7 +88,7 @@ public class MapBasedAttributes2GrantedAuthoritiesMapper implements
* @return the processed Map
*/
private Map<String, Collection<GrantedAuthority>> preProcessMap(Map<?, ?> orgMap) {
Map<String, Collection<GrantedAuthority>> result = new HashMap<String, Collection<GrantedAuthority>>(
Map<String, Collection<GrantedAuthority>> result = new HashMap<>(
orgMap.size());
for (Map.Entry<?, ?> entry : orgMap.entrySet()) {

View File

@@ -43,7 +43,7 @@ class UnmodifiableListDeserializer extends JsonDeserializer<List> {
public List deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {
ObjectMapper mapper = (ObjectMapper) jp.getCodec();
JsonNode node = mapper.readTree(jp);
List<Object> result = new ArrayList<Object>();
List<Object> result = new ArrayList<>();
if (node != null) {
if (node instanceof ArrayNode) {
ArrayNode arrayNode = (ArrayNode) node;