addErrorMessage(errorMessage);
}
- if (getCauses().size() == 0) {
+ if (getCauses().isEmpty()) {
throw new IllegalArgumentException(
"Composite error message must have at least one error");
}
addErrorMessage(i.next());
}
- if (getCauses().size() == 0) {
+ if (getCauses().isEmpty()) {
throw new IllegalArgumentException(
"Composite error message must have at least one error");
}
"The first level of a component hierarchy should contain at most one root component, but found "
+ children.size() + ".");
}
- Element element = children.size() == 0 ? null : children.first();
+ Element element = children.isEmpty() ? null : children.first();
if (componentRoot != null) {
if (element == null) {
throw new DesignException(