diff options
Diffstat (limited to 'server')
3 files changed, 7 insertions, 7 deletions
diff --git a/server/src/main/java/com/vaadin/data/BinderValidationStatus.java b/server/src/main/java/com/vaadin/data/BinderValidationStatus.java index c8d021ad53..90600f1800 100644 --- a/server/src/main/java/com/vaadin/data/BinderValidationStatus.java +++ b/server/src/main/java/com/vaadin/data/BinderValidationStatus.java @@ -137,10 +137,10 @@ public class BinderValidationStatus<BEAN> implements Serializable { * @return a list of all validation errors */ public List<ValidationResult> getValidationErrors() { - ArrayList<ValidationResult> errors = new ArrayList<>( + List<ValidationResult> errors = getFieldValidationErrors().stream() .map(s -> s.getResult().get()) - .collect(Collectors.toList())); + .collect(Collectors.toList()); errors.addAll(getBeanValidationErrors()); return errors; } @@ -148,7 +148,7 @@ public class BinderValidationStatus<BEAN> implements Serializable { /** * Gets the field level validation statuses. * <p> - * The field level validtors have been added with + * The field level validators have been added with * {@link BindingBuilder#withValidator(Validator)}. * * @return the field validation statuses @@ -169,7 +169,7 @@ public class BinderValidationStatus<BEAN> implements Serializable { /** * Gets the failed field level validation statuses. * <p> - * The field level validtors have been added with + * The field level validators have been added with * {@link BindingBuilder#withValidator(Validator)}. * * @return a list of failed field level validation statuses diff --git a/server/src/main/java/com/vaadin/data/ValidationException.java b/server/src/main/java/com/vaadin/data/ValidationException.java index 6b3b0a121a..92043872e2 100644 --- a/server/src/main/java/com/vaadin/data/ValidationException.java +++ b/server/src/main/java/com/vaadin/data/ValidationException.java @@ -60,10 +60,10 @@ public class ValidationException extends Exception { * @return a list of all validation errors */ public List<ValidationResult> getValidationErrors() { - ArrayList<ValidationResult> errors = new ArrayList<>( + List<ValidationResult> errors = getFieldValidationErrors().stream() .map(s -> s.getResult().get()) - .collect(Collectors.toList())); + .collect(Collectors.toList()); errors.addAll(getBeanValidationErrors()); return errors; } diff --git a/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java b/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java index 73343d8312..54914f2287 100644 --- a/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java +++ b/server/src/main/java/com/vaadin/data/provider/HierarchyMapper.java @@ -96,7 +96,7 @@ public class HierarchyMapper<T, F> implements DataGenerator<T> { * */ public Integer getParentIndex(T item) { - // TODO: This can be optimised. + // TODO: This can be optimized. List<T> flatHierarchy = getHierarchy(null).collect(Collectors.toList()); return flatHierarchy.indexOf(getParentOfItem(item)); } |