1
0
mirror of synced 2026-08-05 17:57:15 +00:00

'Collection.toArray()' call style

This commit is contained in:
Lars Grefer
2019-08-09 00:58:17 +02:00
committed by Rob Winch
parent b3352c7c6e
commit 578d628774
10 changed files with 11 additions and 11 deletions
@@ -84,7 +84,7 @@ public class DefaultSpringSecurityContextSource extends LdapContextSource {
}
}
setUrls(urls.toArray(new String[urls.size()]));
setUrls(urls.toArray(new String[0]));
setBase(this.rootDn);
setPooled(true);
setAuthenticationStrategy(new SimpleDirContextAuthenticationStrategy() {
@@ -271,7 +271,7 @@ public class LdapUserDetailsManager implements UserDetailsManager {
}
}
template.modifyAttributes(dn, mods.toArray(new ModificationItem[mods.size()]));
template.modifyAttributes(dn, mods.toArray(new ModificationItem[0]));
// template.rebind(dn, ctx, null);
// Remove the old authorities and replace them with the new one
@@ -201,7 +201,7 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
.searchForMultipleAttributeValues(getGroupSearchBase(),
getGroupSearchFilter(), new String[] { userDn, username },
getAttributeNames()
.toArray(new String[getAttributeNames().size()]));
.toArray(new String[0]));
if (logger.isDebugEnabled()) {
logger.debug("Roles from search: " + userRoles);
@@ -56,7 +56,7 @@ public class Person extends LdapUserDetailsImpl {
}
public String[] getCn() {
return cn.toArray(new String[cn.size()]);
return cn.toArray(new String[0]);
}
public String getDescription() {