'Collection.toArray()' call style
This commit is contained in:
+1
-1
@@ -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() {
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
+1
-1
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user