Polish
1. Removed unnecessary null checks 2. Combined collection initialization and modification 3. Minor collections related optimizations Closes gh-15837
This commit is contained in:
committed by
Stephane Nicoll
parent
6e5ffd8587
commit
4a253ff87c
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2018 the original author or authors.
|
||||
* Copyright 2012-2019 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.
|
||||
@@ -155,8 +155,7 @@ public class EntityScanPackages {
|
||||
String[] basePackages = attributes.getStringArray("basePackages");
|
||||
Class<?>[] basePackageClasses = attributes
|
||||
.getClassArray("basePackageClasses");
|
||||
Set<String> packagesToScan = new LinkedHashSet<>();
|
||||
packagesToScan.addAll(Arrays.asList(basePackages));
|
||||
Set<String> packagesToScan = new LinkedHashSet<>(Arrays.asList(basePackages));
|
||||
for (Class<?> basePackageClass : basePackageClasses) {
|
||||
packagesToScan.add(ClassUtils.getPackageName(basePackageClass));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user