mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Merge pull request #22210 from XenoAmess
* gh-22210: Use new ArrayList(Collection) rather than new, iterate, and add Closes gh-22210
This commit is contained in:
commit
54ce2905af
@ -141,10 +141,7 @@ public abstract class AutoConfigurationPackages {
|
||||
PackageImports(AnnotationMetadata metadata) {
|
||||
AnnotationAttributes attributes = AnnotationAttributes
|
||||
.fromMap(metadata.getAnnotationAttributes(AutoConfigurationPackage.class.getName(), false));
|
||||
List<String> packageNames = new ArrayList<>();
|
||||
for (String basePackage : attributes.getStringArray("basePackages")) {
|
||||
packageNames.add(basePackage);
|
||||
}
|
||||
List<String> packageNames = new ArrayList<>(Arrays.asList(attributes.getStringArray("basePackages")));
|
||||
for (Class<?> basePackageClass : attributes.getClassArray("basePackageClasses")) {
|
||||
packageNames.add(basePackageClass.getPackage().getName());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user