@@ -711,7 +711,7 @@ public class TouchScrollDelegate implements NativePreviewHandler { | |||
} | |||
/** | |||
* long calcucation are not very efficient in GWT, so this helper method | |||
* Long calculation are not very efficient in GWT, so this helper method | |||
* returns timestamp in double. | |||
* | |||
* @return |
@@ -338,8 +338,8 @@ public abstract class AbstractSelect extends AbstractField<Object> implements | |||
// Creates the options container and add given options to it | |||
final Container c = new IndexedContainer(); | |||
if (options != null) { | |||
for (final Iterator<?> i = options.iterator(); i.hasNext();) { | |||
c.addItem(i.next()); | |||
for (final Object item : options) { | |||
c.addItem(item); | |||
} | |||
} | |||
@@ -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 |
@@ -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; | |||
} |
@@ -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)); | |||
} |
@@ -2,6 +2,7 @@ package com.vaadin.tests.components.orderedlayout; | |||
import java.util.ArrayList; | |||
import java.util.Arrays; | |||
import java.util.List; | |||
import com.vaadin.annotations.PreserveOnRefresh; | |||
import com.vaadin.annotations.Theme; | |||
@@ -166,8 +167,7 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { | |||
controls.addComponent(layout); | |||
layout.addComponent(new Label("Layout")); | |||
ArrayList<String> sizes = new ArrayList<>(); | |||
sizes.addAll(Arrays.asList("100px", "30em", "100%")); | |||
List<String> sizes = Arrays.asList("100px", "30em", "100%"); | |||
final NativeSelect width = new NativeSelect(null, sizes); | |||
width.setImmediate(true); | |||
@@ -256,8 +256,7 @@ public class BoxLayoutTest extends AbstractReindeerTestUI { | |||
root.addComponent(component); | |||
component.addComponent(new Label("Component")); | |||
sizes = new ArrayList<>(); | |||
sizes.addAll(Arrays.asList("50px", "200px", "10em", "50%", "100%")); | |||
sizes = Arrays.asList("50px", "200px", "10em", "50%", "100%"); | |||
componentWidth = new NativeSelect(null, sizes); | |||
componentWidth.setImmediate(true); |