Collection.isEmpty() should be used to test for emptiness
Closes gh-1670
This commit is contained in:
committed by
Stephane Nicoll
parent
7da40abba5
commit
e381514b07
@@ -79,7 +79,7 @@ class InitBinderBindingContext extends BindingContext {
|
||||
InitBinder ann = binderMethod.getMethodAnnotation(InitBinder.class);
|
||||
Assert.state(ann != null, "No InitBinder annotation");
|
||||
Collection<String> names = Arrays.asList(ann.value());
|
||||
return (names.size() == 0 || names.contains(dataBinder.getObjectName()));
|
||||
return (names.isEmpty() || names.contains(dataBinder.getObjectName()));
|
||||
})
|
||||
.forEach(method -> invokeBinderMethod(dataBinder, exchange, method));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user