Avoid String allocations with Assert.state()
This commit is contained in:
@@ -40,11 +40,12 @@ public class RegisterReflectionForBindingProcessor implements ReflectiveProcesso
|
||||
RegisterReflectionForBinding registerReflection = AnnotationUtils.getAnnotation(element, RegisterReflectionForBinding.class);
|
||||
if (registerReflection != null) {
|
||||
Class<?>[] classes = registerReflection.classes();
|
||||
Assert.state(classes.length != 0, "A least one class should be specified in" +
|
||||
" @RegisterReflectionForBinding attributes and none was provided on " + element);
|
||||
Assert.state(classes.length != 0, () -> "A least one class should be specified in " +
|
||||
"@RegisterReflectionForBinding attributes, and none was provided on " + element);
|
||||
for (Class<?> type : classes) {
|
||||
this.bindingRegistrar.registerReflectionHints(hints, type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user