Consistent use of StringUtils.toStringArray

This commit is contained in:
Juergen Hoeller
2018-02-16 19:48:43 +01:00
parent 350f318d2e
commit 6d11b40353
27 changed files with 125 additions and 137 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -553,7 +553,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
results.add(beanName);
}
}
return results.toArray(new String[results.size()]);
return StringUtils.toStringArray(results);
}
@Override
@@ -1009,7 +1009,7 @@ public class DefaultListableBeanFactory extends AbstractAutowireCapableBeanFacto
}
}
if (!autowireCandidates.isEmpty()) {
candidateNames = autowireCandidates.toArray(new String[autowireCandidates.size()]);
candidateNames = StringUtils.toStringArray(autowireCandidates);
}
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -504,7 +504,7 @@ public class DefaultSingletonBeanRegistry extends SimpleAliasRegistry implements
if (dependenciesForBean == null) {
return new String[0];
}
return dependenciesForBean.toArray(new String[dependenciesForBean.size()]);
return StringUtils.toStringArray(dependenciesForBean);
}
public void destroySingletons() {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -333,7 +333,7 @@ public class StaticListableBeanFactory implements ListableBeanFactory {
results.add(beanName);
}
}
return results.toArray(new String[results.size()]);
return StringUtils.toStringArray(results);
}
@Override