'Collection.toArray()' call style
This commit is contained in:
parent
b3352c7c6e
commit
578d628774
|
@ -191,7 +191,7 @@ public class JdbcUserDetailsManagerConfigurer<B extends ProviderManagerBuilder<B
|
||||||
|
|
||||||
protected DatabasePopulator getDatabasePopulator() {
|
protected DatabasePopulator getDatabasePopulator() {
|
||||||
ResourceDatabasePopulator dbp = new ResourceDatabasePopulator();
|
ResourceDatabasePopulator dbp = new ResourceDatabasePopulator();
|
||||||
dbp.setScripts(initScripts.toArray(new Resource[initScripts.size()]));
|
dbp.setScripts(initScripts.toArray(new Resource[0]));
|
||||||
return dbp;
|
return dbp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,6 +48,6 @@ class ReactiveMethodSecuritySelector extends
|
||||||
List<String> result = new ArrayList<>();
|
List<String> result = new ArrayList<>();
|
||||||
result.add(AutoProxyRegistrar.class.getName());
|
result.add(AutoProxyRegistrar.class.getName());
|
||||||
result.add(ReactiveMethodSecurityConfiguration.class.getName());
|
result.add(ReactiveMethodSecurityConfiguration.class.getName());
|
||||||
return result.toArray(new String[result.size()]);
|
return result.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,7 +330,7 @@ public final class LogoutConfigurer<H extends HttpSecurityBuilder<H>> extends
|
||||||
private LogoutFilter createLogoutFilter(H http) throws Exception {
|
private LogoutFilter createLogoutFilter(H http) throws Exception {
|
||||||
logoutHandlers.add(contextLogoutHandler);
|
logoutHandlers.add(contextLogoutHandler);
|
||||||
LogoutHandler[] handlers = logoutHandlers
|
LogoutHandler[] handlers = logoutHandlers
|
||||||
.toArray(new LogoutHandler[logoutHandlers.size()]);
|
.toArray(new LogoutHandler[0]);
|
||||||
LogoutFilter result = new LogoutFilter(getLogoutSuccessHandler(), handlers);
|
LogoutFilter result = new LogoutFilter(getLogoutSuccessHandler(), handlers);
|
||||||
result.setLogoutRequestMatcher(getLogoutRequestMatcher(http));
|
result.setLogoutRequestMatcher(getLogoutRequestMatcher(http));
|
||||||
result = postProcess(result);
|
result = postProcess(result);
|
||||||
|
|
|
@ -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);
|
setBase(this.rootDn);
|
||||||
setPooled(true);
|
setPooled(true);
|
||||||
setAuthenticationStrategy(new SimpleDirContextAuthenticationStrategy() {
|
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);
|
// template.rebind(dn, ctx, null);
|
||||||
// Remove the old authorities and replace them with the new one
|
// Remove the old authorities and replace them with the new one
|
||||||
|
|
|
@ -201,7 +201,7 @@ public class NestedLdapAuthoritiesPopulator extends DefaultLdapAuthoritiesPopula
|
||||||
.searchForMultipleAttributeValues(getGroupSearchBase(),
|
.searchForMultipleAttributeValues(getGroupSearchBase(),
|
||||||
getGroupSearchFilter(), new String[] { userDn, username },
|
getGroupSearchFilter(), new String[] { userDn, username },
|
||||||
getAttributeNames()
|
getAttributeNames()
|
||||||
.toArray(new String[getAttributeNames().size()]));
|
.toArray(new String[0]));
|
||||||
|
|
||||||
if (logger.isDebugEnabled()) {
|
if (logger.isDebugEnabled()) {
|
||||||
logger.debug("Roles from search: " + userRoles);
|
logger.debug("Roles from search: " + userRoles);
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class Person extends LdapUserDetailsImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String[] getCn() {
|
public String[] getCn() {
|
||||||
return cn.toArray(new String[cn.size()]);
|
return cn.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
|
|
|
@ -80,7 +80,7 @@ final class DigestAuthUtils {
|
||||||
list.add(str.substring(start, i));
|
list.add(str.substring(start, i));
|
||||||
}
|
}
|
||||||
|
|
||||||
return list.toArray(new String[list.size()]);
|
return list.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -248,6 +248,6 @@ class SavedRequestAwareWrapper extends HttpServletRequestWrapper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return combinedParams.toArray(new String[combinedParams.size()]);
|
return combinedParams.toArray(new String[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ public class ThrowableAnalyzer {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
final Class<? extends Throwable>[] getRegisteredTypes() {
|
final Class<? extends Throwable>[] getRegisteredTypes() {
|
||||||
Set<Class<? extends Throwable>> typeList = this.extractorMap.keySet();
|
Set<Class<? extends Throwable>> typeList = this.extractorMap.keySet();
|
||||||
return typeList.toArray(new Class[typeList.size()]);
|
return typeList.toArray(new Class[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -171,7 +171,7 @@ public class ThrowableAnalyzer {
|
||||||
currentThrowable = extractCause(currentThrowable);
|
currentThrowable = extractCause(currentThrowable);
|
||||||
}
|
}
|
||||||
|
|
||||||
return chain.toArray(new Throwable[chain.size()]);
|
return chain.toArray(new Throwable[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue