mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-09 16:49:36 +00:00
Use "isEmpty" to check if a collection is empty
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
committed by
Brian Clozel
parent
4cdd314850
commit
c1ba31c40f
+1
-1
@@ -35,7 +35,7 @@ public class ComponentFactoryBean implements FactoryBean<Component> {
|
||||
|
||||
@Override
|
||||
public Component getObject() {
|
||||
if (this.children != null && this.children.size() > 0) {
|
||||
if (this.children != null && !this.children.isEmpty()) {
|
||||
for (Component child : children) {
|
||||
this.parent.addComponent(child);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user