Use Collections.isEmpty() instead of .size() == 0
Ensure that Collections.isEmpty() is used to check if there are no elements in a collections. This is more explicit and can be faster than calling .size(). Closes gh-4783
This commit is contained in:
committed by
Phillip Webb
parent
6113643cbe
commit
786aacf2e9
@@ -73,7 +73,7 @@ public class PropertiesMergingResourceTransformer implements ResourceTransformer
|
||||
|
||||
@Override
|
||||
public boolean hasTransformedResource() {
|
||||
return this.data.size() > 0;
|
||||
return !this.data.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user