diff options
author | Artur Signell <artur@vaadin.com> | 2016-08-31 15:56:58 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2016-08-31 16:40:54 +0300 |
commit | 82806ef9b7f12c66e620a813c7987c0fbea723dc (patch) | |
tree | d9ed9165d7065e63613c306895bd8b3739c3f004 /compatibility-server | |
parent | 277b1a5c2884291ea9312d555dc45545430c1d9c (diff) | |
download | vaadin-framework-82806ef9b7f12c66e620a813c7987c0fbea723dc.tar.gz vaadin-framework-82806ef9b7f12c66e620a813c7987c0fbea723dc.zip |
Format the project using Neon, remove trailing whitespace
Change-Id: I145e20226958910c243b9897bb1e9516919f55cd
Diffstat (limited to 'compatibility-server')
55 files changed, 268 insertions, 316 deletions
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java index c280525dcd..81a78378d7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/Container.java @@ -839,8 +839,8 @@ public interface Container extends Serializable { * Adding items (if supported) to a filtered {@link Ordered} or * {@link Indexed} container should insert them immediately after the * indicated visible item. The unfiltered position of items added at index - * 0, at index {@link com.vaadin.v7.data.Container#size()} or at an undefined - * position is up to the implementation. + * 0, at index {@link com.vaadin.v7.data.Container#size()} or at an + * undefined position is up to the implementation. * </p> * <p> * The functionality of SimpleFilterable can be implemented using the diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java index bee3f7c80b..839d90344c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/BeanFieldGroup.java @@ -156,8 +156,8 @@ public class BeanFieldGroup<T> extends FieldGroup { } @Override - public <T extends Field> T buildAndBind(String caption, - Object propertyId, Class<T> fieldType) throws BindException { + public <T extends Field> T buildAndBind(String caption, Object propertyId, + Class<T> fieldType) throws BindException { ensureNestedPropertyAdded(propertyId); return super.buildAndBind(caption, propertyId, fieldType); } @@ -227,8 +227,7 @@ public class BeanFieldGroup<T> extends FieldGroup { * @param bean * the bean to be bound * @param objectWithMemberFields - * the class that contains {@link Field}s for bean - * properties + * the class that contains {@link Field}s for bean properties * @return the bean field group used to make binding */ public static <T> BeanFieldGroup<T> bindFieldsUnbuffered(T bean, @@ -249,8 +248,7 @@ public class BeanFieldGroup<T> extends FieldGroup { * @param bean * the bean to be bound * @param objectWithMemberFields - * the class that contains {@link Field}s for bean - * properties + * the class that contains {@link Field}s for bean properties * @return the bean field group used to make binding */ public static <T> BeanFieldGroup<T> bindFieldsBuffered(T bean, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java index 07eb9f27c8..924ded1654 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroup.java @@ -245,8 +245,7 @@ public class FieldGroup implements Serializable { * If the field is null or the property id is already bound to * another field by this field binder */ - public void bind(Field<?> field, Object propertyId) - throws BindException { + public void bind(Field<?> field, Object propertyId) throws BindException { throwIfFieldIsNull(field, propertyId); throwIfPropertyIdAlreadyBound(field, propertyId); @@ -745,8 +744,8 @@ public class FieldGroup implements Serializable { /** * Checks the validity of the bound fields. * <p> - * Call the {@link Field#validate()} for the fields to get the - * individual error messages. + * Call the {@link Field#validate()} for the fields to get the individual + * error messages. * * @return true if all bound fields are valid, false otherwise. */ @@ -841,9 +840,9 @@ public class FieldGroup implements Serializable { * that have not been initialized. * <p> * This method processes all (Java) member fields whose type extends - * {@link Field} and that can be mapped to a property id. Property ids - * are searched in the following order: @{@link PropertyId} annotations, - * exact field name matches and the case-insensitive matching that ignores + * {@link Field} and that can be mapped to a property id. Property ids are + * searched in the following order: @{@link PropertyId} annotations, exact + * field name matches and the case-insensitive matching that ignores * underscores. Fields that are not initialized (null) are built using the * field factory. All non-null fields for which a property id can be * determined are bound to the property id. @@ -886,9 +885,9 @@ public class FieldGroup implements Serializable { * member fields that have not been initialized. * <p> * This method processes all (Java) member fields whose type extends - * {@link Field} and that can be mapped to a property id. Property ids - * are searched in the following order: @{@link PropertyId} annotations, - * exact field name matches and the case-insensitive matching that ignores + * {@link Field} and that can be mapped to a property id. Property ids are + * searched in the following order: @{@link PropertyId} annotations, exact + * field name matches and the case-insensitive matching that ignores * underscores. Fields that are not initialized (null) are built using the * field factory is buildFields is true. All non-null fields for which a * property id can be determined are bound to the property id. @@ -1154,8 +1153,7 @@ public class FieldGroup implements Serializable { * finder. * @throws BindException * If there is a problem while building or binding - * @return The created and bound field. Can be any type of - * {@link Field}. + * @return The created and bound field. Can be any type of {@link Field}. */ public Field<?> buildAndBind(String caption, Object propertyId) throws BindException { @@ -1173,12 +1171,11 @@ public class FieldGroup implements Serializable { * finder. * @throws BindException * If the field could not be created - * @return The created and bound field. Can be any type of - * {@link Field}. + * @return The created and bound field. Can be any type of {@link Field}. */ - public <T extends Field> T buildAndBind(String caption, - Object propertyId, Class<T> fieldType) throws BindException { + public <T extends Field> T buildAndBind(String caption, Object propertyId, + Class<T> fieldType) throws BindException { Class<?> type = getPropertyType(propertyId); T field = build(caption, type, fieldType); @@ -1191,8 +1188,8 @@ public class FieldGroup implements Serializable { * Creates a field based on the given data type. * <p> * The data type is the type that we want to edit using the field. The field - * type is the type of field we want to create, can be {@link Field} - * if any LegacyField is good. + * type is the type of field we want to create, can be {@link Field} if any + * LegacyField is good. * </p> * * @param caption diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java index 275f96761a..c6b1d18962 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/FieldGroupFieldFactory.java @@ -33,11 +33,10 @@ public interface FieldGroupFieldFactory extends Serializable { * @param dataType * The type that we want to edit using the field * @param fieldType - * The type of field we want to create. If set to - * {@link Field} then any type of field is accepted + * The type of field we want to create. If set to {@link Field} + * then any type of field is accepted * @return A field that can be assigned to the given fieldType and that is * capable of editing the given type of data */ - <T extends Field> T createField(Class<?> dataType, - Class<T> fieldType); + <T extends Field> T createField(Class<?> dataType, Class<T> fieldType); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java index 09426bc811..3f9bbcdb20 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/fieldgroup/PropertyId.java @@ -29,9 +29,9 @@ import com.vaadin.v7.ui.Field; * The automatic data binding in FieldGroup and BeanFieldGroup relies on a * naming convention by default: properties of an item are bound to similarly * named field components in given a editor object. If you want to map a - * property with a different name (ID) to a - * {@link com.vaadin.client.ui.Field}, you can use this annotation for the - * member fields, with the name (ID) of the desired property as the parameter. + * property with a different name (ID) to a {@link com.vaadin.client.ui.Field}, + * you can use this annotation for the member fields, with the name (ID) of the + * desired property as the parameter. * <p> * In following usage example, the text field would be bound to property "foo" * in the Entity class. <code> diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java index 4b004d95fa..ce984572c2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractBeanContainer.java @@ -536,7 +536,8 @@ public abstract class AbstractBeanContainer<IDTYPE, BEANTYPE> /** * Adds the bean after the given bean. * - * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object) + * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, + * Object) */ protected BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId, IDTYPE newItemId, BEANTYPE bean) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java index 0127adbfee..0b08264fc5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanContainer.java @@ -92,7 +92,8 @@ public class BeanContainer<IDTYPE, BEANTYPE> /** * Adds the bean after the given item id. * - * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object) + * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, + * Object) */ @Override public BeanItem<BEANTYPE> addItemAfter(IDTYPE previousItemId, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java index 1e75901b04..de8d6d1cf0 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/BeanItemContainer.java @@ -186,7 +186,8 @@ public class BeanItemContainer<BEANTYPE> * @param newItemId * the bean (of type BT) to add (not null) * - * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, Object) + * @see com.com.vaadin.v7.data.Container.Ordered#addItemAfter(Object, + * Object) */ @Override @SuppressWarnings("unchecked") diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java index c95f97a1f1..108606665a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/PropertyFormatter.java @@ -239,7 +239,8 @@ public abstract class PropertyFormatter<T> extends AbstractProperty<String> * This should not be called directly. */ @Override - public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) { + public void valueChange( + com.vaadin.v7.data.Property.ValueChangeEvent event) { fireValueChange(); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java index c789e7d1e8..5f25af89a6 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DateToSqlDateConverter.java @@ -32,8 +32,7 @@ import java.util.Locale; * @since 7.1 * @author Vaadin Ltd */ -public class DateToSqlDateConverter - implements Converter<Date, java.sql.Date> { +public class DateToSqlDateConverter implements Converter<Date, java.sql.Date> { @Override public java.sql.Date convertToModel(Date value, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java index 681cbfc6b2..17925dc827 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/DefaultConverterFactory.java @@ -24,8 +24,8 @@ import java.util.logging.Logger; import com.vaadin.server.VaadinSession; /** - * Default implementation of {@link ConverterFactory}. Provides converters - * for standard types like {@link String}, {@link Double} and {@link Date}. + * Default implementation of {@link ConverterFactory}. Provides converters for + * standard types like {@link String}, {@link Double} and {@link Date}. * </p> * <p> * Custom converters can be provided by extending this class and using @@ -57,8 +57,7 @@ public class DefaultConverterFactory implements ConverterFactory { if (reverseConverter != null) { log.finest(getClass().getName() + " created a reverse " + reverseConverter.getClass()); - return new ReverseConverter<PRESENTATION, MODEL>( - reverseConverter); + return new ReverseConverter<PRESENTATION, MODEL>(reverseConverter); } log.finest(getClass().getName() + " could not find a converter for " @@ -90,8 +89,7 @@ public class DefaultConverterFactory implements ConverterFactory { } - protected Converter<Date, ?> createDateConverter( - Class<?> sourceType) { + protected Converter<Date, ?> createDateConverter(Class<?> sourceType) { if (Long.class.isAssignableFrom(sourceType)) { return new DateToLongConverter(); } else if (java.sql.Date.class.isAssignableFrom(sourceType)) { @@ -101,8 +99,7 @@ public class DefaultConverterFactory implements ConverterFactory { } } - protected Converter<String, ?> createStringConverter( - Class<?> sourceType) { + protected Converter<String, ?> createStringConverter(Class<?> sourceType) { if (Double.class.isAssignableFrom(sourceType)) { return new StringToDoubleConverter(); } else if (Float.class.isAssignableFrom(sourceType)) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java index cbbf62ad6c..a7f6a3fec2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/ReverseConverter.java @@ -19,8 +19,8 @@ package com.vaadin.v7.data.util.converter; import java.util.Locale; /** - * A converter that wraps another {@link Converter} and reverses source - * and target types. + * A converter that wraps another {@link Converter} and reverses source and + * target types. * * @param <MODEL> * The source type @@ -42,8 +42,7 @@ public class ReverseConverter<PRESENTATION, MODEL> * @param converter * The converter to use in a reverse fashion */ - public ReverseConverter( - Converter<MODEL, PRESENTATION> converter) { + public ReverseConverter(Converter<MODEL, PRESENTATION> converter) { this.realConverter = converter; } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java index c8ebea6e5b..3c3fb262e4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToBooleanConverter.java @@ -33,8 +33,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class StringToBooleanConverter - implements Converter<String, Boolean> { +public class StringToBooleanConverter implements Converter<String, Boolean> { private final String trueString; @@ -58,8 +57,7 @@ public class StringToBooleanConverter * @param trueString * string representation for <code>true</code> */ - public StringToBooleanConverter(String trueString, - String falseString) { + public StringToBooleanConverter(String trueString, String falseString) { this.trueString = trueString; this.falseString = falseString; } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java index 708cc13fe8..e217f1ed52 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToCollectionConverter.java @@ -77,8 +77,8 @@ public class StringToCollectionConverter * @param tokenType * expected token model type */ - public StringToCollectionConverter( - Converter<String, ?> tokenConverter, Class<?> tokenType) { + public StringToCollectionConverter(Converter<String, ?> tokenConverter, + Class<?> tokenType) { this(", ", tokenConverter, tokenType); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java index 7d7f5b96aa..c809a6a8a7 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToDateConverter.java @@ -34,8 +34,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.0 */ -public class StringToDateConverter - implements Converter<String, Date> { +public class StringToDateConverter implements Converter<String, Date> { /** * Returns the format used by diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java index d753b1e73f..7562c12517 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/converter/StringToEnumConverter.java @@ -36,8 +36,7 @@ import java.util.Locale; * @author Vaadin Ltd * @since 7.4 */ -public class StringToEnumConverter - implements Converter<String, Enum> { +public class StringToEnumConverter implements Converter<String, Enum> { @Override public Enum convertToModel(String value, Class<? extends Enum> targetType, diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java index 8f900961df..eae0c6fec5 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/AbstractValidator.java @@ -18,8 +18,8 @@ package com.vaadin.v7.data.validator; import com.vaadin.v7.data.Validator; /** - * Abstract {@link com.vaadin.v7.data.Validator Validator} implementation - * that provides a basic Validator implementation except the + * Abstract {@link com.vaadin.v7.data.Validator Validator} implementation that + * provides a basic Validator implementation except the * {@link #isValidValue(Object)} method. * <p> * To include the value that failed validation in the exception message you can diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java index 652e33e12e..40fd442dca 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigDecimalRangeValidator.java @@ -24,8 +24,7 @@ import java.math.BigDecimal; * @since 7.4 */ @SuppressWarnings("serial") -public class BigDecimalRangeValidator - extends RangeValidator<BigDecimal> { +public class BigDecimalRangeValidator extends RangeValidator<BigDecimal> { /** * Creates a validator for checking that an BigDecimal is within a given @@ -43,8 +42,8 @@ public class BigDecimalRangeValidator * @param maxValue * The maximum value to accept or null for no limit */ - public BigDecimalRangeValidator(String errorMessage, - BigDecimal minValue, BigDecimal maxValue) { + public BigDecimalRangeValidator(String errorMessage, BigDecimal minValue, + BigDecimal maxValue) { super(errorMessage, BigDecimal.class, minValue, maxValue); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java index 62ec012344..bf237b565b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/BigIntegerRangeValidator.java @@ -24,8 +24,7 @@ import java.math.BigInteger; * @since 7.4 */ @SuppressWarnings("serial") -public class BigIntegerRangeValidator - extends RangeValidator<BigInteger> { +public class BigIntegerRangeValidator extends RangeValidator<BigInteger> { /** * Creates a validator for checking that an BigInteger is within a given @@ -43,8 +42,8 @@ public class BigIntegerRangeValidator * @param maxValue * The maximum value to accept or null for no limit */ - public BigIntegerRangeValidator(String errorMessage, - BigInteger minValue, BigInteger maxValue) { + public BigIntegerRangeValidator(String errorMessage, BigInteger minValue, + BigInteger maxValue) { super(errorMessage, BigInteger.class, minValue, maxValue); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java index f46f8d989e..2abbc98460 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DateRangeValidator.java @@ -53,8 +53,8 @@ public class DateRangeValidator extends RangeValidator<Date> { * @param maxValue * The maximum value to accept or null for no limit */ - public DateRangeValidator(String errorMessage, Date minValue, - Date maxValue, Resolution resolution) { + public DateRangeValidator(String errorMessage, Date minValue, Date maxValue, + Resolution resolution) { super(errorMessage, Date.class, minValue, maxValue); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java index 0d0dd8ff40..a6875c961c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/DoubleValidator.java @@ -20,14 +20,14 @@ import com.vaadin.v7.data.util.converter.StringToDoubleConverter; /** * String validator for a double precision floating point number. See - * {@link com.vaadin.v7.data.validator.AbstractStringValidator} for - * more information. + * {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more + * information. * * @author Vaadin Ltd. * @since 5.4 - * @deprecated As of 7.0. Use a {@link StringToDoubleConverter} converter - * on the field instead or bind the field to a {@link Property} of - * type {@link Double}. + * @deprecated As of 7.0. Use a {@link StringToDoubleConverter} converter on the + * field instead or bind the field to a {@link Property} of type + * {@link Double}. */ @Deprecated @SuppressWarnings("serial") @@ -40,8 +40,8 @@ public class DoubleValidator extends AbstractStringValidator { * @param errorMessage * the message to display in case the value does not validate. * @deprecated As of 7.0. Use a Double converter on the field instead and/or - * use a {@link DoubleRangeValidator} for validating that - * the value is inside a given range. + * use a {@link DoubleRangeValidator} for validating that the + * value is inside a given range. */ @Deprecated public DoubleValidator(String errorMessage) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java index 7d87eda52e..c2c6ea943a 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/EmailValidator.java @@ -20,8 +20,8 @@ package com.vaadin.v7.data.validator; * complete according to RFC 822 but handles the vast majority of valid e-mail * addresses correctly. * - * See {@link com.vaadin.v7.data.validator.AbstractStringValidator} - * for more information. + * See {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more + * information. * * <p> * An empty string or a null is always accepted - use the required flag on diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java index b5f671b6f1..afa6e3ee59 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/IntegerValidator.java @@ -20,14 +20,14 @@ import com.vaadin.v7.data.util.converter.StringToIntegerConverter; /** * String validator for integers. See - * {@link com.vaadin.v7.data.validator.AbstractStringValidator} for - * more information. + * {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more + * information. * * @author Vaadin Ltd. * @since 5.4 - * @deprecated As of 7.0. Use a {@link StringToIntegerConverter} converter - * on the field instead or bind the field to a {@link Property} of - * type {@link Integer}. + * @deprecated As of 7.0. Use a {@link StringToIntegerConverter} converter on + * the field instead or bind the field to a {@link Property} of type + * {@link Integer}. */ @SuppressWarnings("serial") @Deprecated @@ -40,8 +40,8 @@ public class IntegerValidator extends AbstractStringValidator { * @param errorMessage * the message to display in case the value does not validate. * @deprecated As of 7.0. Use an Integer converter on the field instead - * and/or use an {@link IntegerRangeValidator} for - * validating that the value is inside a given range. + * and/or use an {@link IntegerRangeValidator} for validating + * that the value is inside a given range. */ @Deprecated public IntegerValidator(String errorMessage) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java index c4749ae2a6..65cb6cc6f9 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RangeValidator.java @@ -24,8 +24,8 @@ package com.vaadin.v7.data.validator; * {@link IntegerRangeValidator}, {@link DoubleRangeValidator} or * {@link DateRangeValidator} in applications. * <p> - * Note that {@link RangeValidator} always accept null values. Make a - * field required to ensure that no empty values are accepted or override + * Note that {@link RangeValidator} always accept null values. Make a field + * required to ensure that no empty values are accepted or override * {@link #isValidValue(Comparable)}. * </p> * @@ -35,8 +35,7 @@ package com.vaadin.v7.data.validator; * @author Vaadin Ltd. * @since 7.0 */ -public class RangeValidator<T extends Comparable> - extends AbstractValidator<T> { +public class RangeValidator<T extends Comparable> extends AbstractValidator<T> { private T minValue = null; private boolean minValueIncluded = true; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java index a9af0d0167..7fd2229548 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/data/validator/RegexpValidator.java @@ -27,8 +27,8 @@ import java.util.regex.Pattern; * {@link java.util.regex.Pattern#sum} * </p> * <p> - * See {@link com.vaadin.v7.data.validator.AbstractStringValidator} - * for more information. + * See {@link com.vaadin.v7.data.validator.AbstractStringValidator} for more + * information. * </p> * <p> * An empty string or a null is always accepted - use the required flag on diff --git a/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java b/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java index 1285fdc797..2c399890c1 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/event/DataBoundTransferable.java @@ -62,8 +62,8 @@ public abstract class DataBoundTransferable extends TransferableImpl { /** * Returns the container data source from which the transfer occurs. * - * {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is used - * to obtain the underlying container of the source component. + * {@link com.vaadin.v7.data.Container.Viewer#getContainerDataSource()} is + * used to obtain the underlying container of the source component. * * @return Container */ diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java index b051eaf666..73ce2f3a99 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractField.java @@ -68,8 +68,8 @@ import com.vaadin.v7.data.util.converter.ConverterUtil; * </p> * * <p> - * The class also supports {@link com.vaadin.v7.data.Validator validators} - * to make sure the value contained in the field is valid. + * The class also supports {@link com.vaadin.v7.data.Validator validators} to + * make sure the value contained in the field is valid. * </p> * * @author Vaadin Ltd. @@ -424,8 +424,8 @@ public abstract class AbstractField<T> extends AbstractComponent * @throws Property.ReadOnlyException */ @Override - public void setValue(T newFieldValue) throws Property.ReadOnlyException, - Converter.ConversionException { + public void setValue(T newFieldValue) + throws Property.ReadOnlyException, Converter.ConversionException { setValue(newFieldValue, false); } @@ -585,10 +585,10 @@ public abstract class AbstractField<T> extends AbstractComponent * <p> * If the data source implements * {@link com.vaadin.v7.data.Property.ValueChangeNotifier} and/or - * {@link com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier}, the field - * registers itself as a listener and updates itself according to the events - * it receives. To avoid memory leaks caused by references to a field no - * longer in use, the listener registrations are removed on + * {@link com.vaadin.v7.data.Property.ReadOnlyStatusChangeNotifier}, the + * field registers itself as a listener and updates itself according to the + * events it receives. To avoid memory leaks caused by references to a field + * no longer in use, the listener registrations are removed on * {@link AbstractField#detach() detach} and re-added on * {@link AbstractField#attach() attach}. * </p> @@ -621,8 +621,8 @@ public abstract class AbstractField<T> extends AbstractComponent // Check if the current converter is compatible. if (newDataSource != null - && !ConverterUtil.canConverterPossiblyHandle( - getConverter(), getType(), newDataSource.getType())) { + && !ConverterUtil.canConverterPossiblyHandle(getConverter(), + getType(), newDataSource.getType())) { // There is no converter set or there is no way the current // converter can be compatible. setConverter(newDataSource.getType()); @@ -805,9 +805,9 @@ public abstract class AbstractField<T> extends AbstractComponent * Returns the current value (as returned by {@link #getValue()}) converted * to the data source type. * <p> - * This returns the same as {@link AbstractField#getValue()} if no - * converter has been set. The value is not necessarily the same as the data - * source value e.g. if the field is in buffered mode and has been modified. + * This returns the same as {@link AbstractField#getValue()} if no converter + * has been set. The value is not necessarily the same as the data source + * value e.g. if the field is in buffered mode and has been modified. * </p> * * @return The converted value that is compatible with the data source type @@ -1584,8 +1584,8 @@ public abstract class AbstractField<T> extends AbstractComponent /** * A ready-made {@link ShortcutListener} that focuses the given - * {@link Focusable} (usually a {@link Field}) when the keyboard - * shortcut is invoked. + * {@link Focusable} (usually a {@link Field}) when the keyboard shortcut is + * invoked. * */ public static class FocusShortcut extends ShortcutListener { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java index 35cbfee405..c7e90afb4c 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractSelect.java @@ -80,9 +80,8 @@ import com.vaadin.v7.shared.ui.select.AbstractSelectState; */ @SuppressWarnings("serial") // TODO currently cannot specify type more precisely in case of multi-select -public abstract class AbstractSelect extends AbstractField<Object> - implements Container, Container.Viewer, - Container.PropertySetChangeListener, +public abstract class AbstractSelect extends AbstractField<Object> implements + Container, Container.Viewer, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.ItemSetChangeNotifier, Container.ItemSetChangeListener, LegacyComponent { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java index c9843de648..d4d17cd7b4 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/AbstractTextField.java @@ -129,11 +129,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements } if (hasListeners(TextChangeEvent.class)) { - target.addAttribute( - TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE, + target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_EVENTMODE, getTextChangeEventMode().toString()); - target.addAttribute( - TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT, + target.addAttribute(TextFieldConstants.ATTR_TEXTCHANGE_TIMEOUT, getTextChangeTimeout()); if (lastKnownTextContent != null) { /* @@ -477,8 +475,7 @@ public abstract class AbstractTextField extends AbstractField<String> implements * some sort of diffs instead of always sending the whole text content. * Also on value change events we could use the mechanism. */ - String object = (String) variables - .get(TextFieldConstants.VAR_CUR_TEXT); + String object = (String) variables.get(TextFieldConstants.VAR_CUR_TEXT); lastKnownTextContent = object; textChangeEventPending = true; } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java index 47323f001c..5de6fa3d4b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/CheckBox.java @@ -248,8 +248,7 @@ public class CheckBox extends AbstractField<Boolean> { @Override public void writeDesign(Element design, DesignContext designContext) { super.writeDesign(design, designContext); - CheckBox def = (CheckBox) designContext - .getDefaultInstance(this); + CheckBox def = (CheckBox) designContext.getDefaultInstance(this); Attributes attr = design.attributes(); DesignAttributeHandler.writeAttribute("checked", attr, getValue(), def.getValue(), Boolean.class); diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java index 8777d8fc48..b1e314d4de 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/DateField.java @@ -58,8 +58,8 @@ import com.vaadin.v7.shared.ui.datefield.TextualDateFieldState; * </p> * <p> * A <code>DateField</code> is in write-through mode by default, so - * {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)}must - * be called to enable buffering. + * {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)}must be called + * to enable buffering. * </p> * * @author Vaadin Ltd. @@ -214,8 +214,7 @@ public class DateField extends AbstractField<Date> implements * @param dataSource * the Property to be edited with this editor. */ - public DateField(Property dataSource) - throws IllegalArgumentException { + public DateField(Property dataSource) throws IllegalArgumentException { if (!Date.class.isAssignableFrom(dataSource.getType())) { throw new IllegalArgumentException( "Can't use " + dataSource.getType().getName() diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java index 0756dfaf90..79c685c71b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Field.java @@ -28,8 +28,7 @@ import com.vaadin.v7.data.Property; * a value that the user can change through the user interface. * * LegacyField components are built upon the framework defined in the - * LegacyField interface and the {@link com.vaadin.AbstractField} base - * class. + * LegacyField interface and the {@link com.vaadin.AbstractField} base class. * * The LegacyField interface inherits the {@link com.vaadin.ui.Component} * superinterface and also the {@link com.vaadin.ui.Property} interface to have @@ -47,8 +46,8 @@ import com.vaadin.v7.data.Property; * extend {@link com.vaadin.ui.AbstractField} instead. */ @Deprecated -public interface Field<T> extends Component, BufferedValidatable, - Property<T>, Property.ValueChangeNotifier, Property.ValueChangeListener, +public interface Field<T> extends Component, BufferedValidatable, Property<T>, + Property.ValueChangeNotifier, Property.ValueChangeListener, Property.Editor, Focusable, HasRequired { /** * Is this field required. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java index 5544520be5..90fa058ec2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Grid.java @@ -137,9 +137,9 @@ import elemental.json.JsonValue; * <p> * Each column has its own {@link Renderer} that displays data into something * that can be displayed in the browser. That data is first converted with a - * {@link com.vaadin.v7.data.util.converter.Converter Converter} into - * something that the Renderer can process. This can also be an implicit step - - * if a column has a simple data type, like a String, no explicit assignment is + * {@link com.vaadin.v7.data.util.converter.Converter Converter} into something + * that the Renderer can process. This can also be an implicit step - if a + * column has a simple data type, like a String, no explicit assignment is * needed. * <p> * Usually a renderer takes some kind of object, and converts it into a @@ -544,8 +544,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, } @Override - protected <T extends Field> T build(String caption, - Class<?> dataType, Class<T> fieldType) throws BindException { + protected <T extends Field> T build(String caption, Class<?> dataType, + Class<T> fieldType) throws BindException { T field = super.build(caption, dataType, fieldType); if (field instanceof CheckBox) { field.setCaption(null); @@ -3218,8 +3218,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * A check for allowing the * {@link #Column(Grid, GridColumnState, Object) constructor} to call - * {@link #setConverter(Converter)} with a <code>null</code>, even - * if model and renderer aren't compatible. + * {@link #setConverter(Converter)} with a <code>null</code>, even if + * model and renderer aren't compatible. */ private boolean isFirstConverterAssignment = true; diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java index a7378cd45b..cf223b0779 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/PopupDateField.java @@ -42,8 +42,7 @@ public class PopupDateField extends DateField { super(); } - public PopupDateField(Property dataSource) - throws IllegalArgumentException { + public PopupDateField(Property dataSource) throws IllegalArgumentException { super(dataSource); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java index 7dcfdff641..5656a59af2 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/Table.java @@ -4172,8 +4172,8 @@ public class Table extends AbstractSelect implements Action.Container, if (hasConverter(colId)) { converter = getConverter(colId); } else { - converter = (Converter) ConverterUtil.getConverter( - String.class, property.getType(), getSession()); + converter = (Converter) ConverterUtil.getConverter(String.class, + property.getType(), getSession()); } Object value = property.getValue(); if (converter != null) { diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java index 1ed286738d..014c86c72f 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TableFieldFactory.java @@ -50,7 +50,7 @@ public interface TableFieldFactory extends Serializable { * @return A field suitable for editing the specified data or null if the * property should not be editable. */ - Field<?> createField(Container container, Object itemId, - Object propertyId, Component uiContext); + Field<?> createField(Container container, Object itemId, Object propertyId, + Component uiContext); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java index 0bd9511a71..2f958e629b 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/TextField.java @@ -34,8 +34,8 @@ import com.vaadin.v7.data.Property; * Since <code>TextField</code> extends <code>LegacyAbstractField</code> it * implements the {@link com.vaadin.v7.data.Buffered} interface. A * <code>TextField</code> is in write-through mode by default, so - * {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)} - * must be called to enable buffering. + * {@link com.vaadin.v7.ui.AbstractField#setWriteThrough(boolean)} must be + * called to enable buffering. * </p> * * @author Vaadin Ltd. diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java index f9f4100e53..ab439e9d12 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/components/calendar/CalendarTargetDetails.java @@ -23,11 +23,11 @@ import com.vaadin.event.dd.TargetDetailsImpl; import com.vaadin.v7.ui.Calendar; /** - * Drop details for {@link com.vaadin.v7.ui.addon.calendar.ui.Calendar Calendar}. - * When something is dropped on the Calendar, this class contains the specific - * details of the drop point. Specifically, this class gives access to the date - * where the drop happened. If the Calendar was in weekly mode, the date also - * includes the start time of the slot. + * Drop details for {@link com.vaadin.v7.ui.addon.calendar.ui.Calendar + * Calendar}. When something is dropped on the Calendar, this class contains the + * specific details of the drop point. Specifically, this class gives access to + * the date where the drop happened. If the Calendar was in weekly mode, the + * date also includes the start time of the slot. * * @since 7.1 * @author Vaadin Ltd. diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java index 6606d84b5f..38ac1a8f9c 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/fieldgroup/DefaultFieldGroupFieldFactoryTest.java @@ -65,24 +65,21 @@ public class DefaultFieldGroupFieldFactoryTest { @Test public void testDateGenerationForPopupDateField() { - Field f = fieldFactory.createField(Date.class, - DateField.class); + Field f = fieldFactory.createField(Date.class, DateField.class); Assert.assertNotNull(f); Assert.assertEquals(PopupDateField.class, f.getClass()); } @Test public void testDateGenerationForInlineDateField() { - Field f = fieldFactory.createField(Date.class, - InlineDateField.class); + Field f = fieldFactory.createField(Date.class, InlineDateField.class); Assert.assertNotNull(f); Assert.assertEquals(InlineDateField.class, f.getClass()); } @Test public void testDateGenerationForTextField() { - Field f = fieldFactory.createField(Date.class, - TextField.class); + Field f = fieldFactory.createField(Date.class, TextField.class); Assert.assertNotNull(f); Assert.assertEquals(TextField.class, f.getClass()); } @@ -100,8 +97,7 @@ public class DefaultFieldGroupFieldFactoryTest { @Test public void testEnumComboBox() { - Field f = fieldFactory.createField(SomeEnum.class, - ComboBox.class); + Field f = fieldFactory.createField(SomeEnum.class, ComboBox.class); Assert.assertNotNull(f); Assert.assertEquals(ComboBox.class, f.getClass()); } @@ -116,8 +112,7 @@ public class DefaultFieldGroupFieldFactoryTest { @Test public void testEnumAnyField() { - Field f = fieldFactory.createField(SomeEnum.class, - Field.class); + Field f = fieldFactory.createField(SomeEnum.class, Field.class); Assert.assertNotNull(f); Assert.assertEquals(ListSelect.class, f.getClass()); } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java b/compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java index 6aa4c5a2af..3e38584e7f 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/data/util/TransactionalPropertyWrapperTest.java @@ -65,8 +65,7 @@ public class TransactionalPropertyWrapperTest { private final TextField nameField = new TextField("Name"); private final TextField ageField = new TextField("Age"); - private final TextField unboundField = new TextField( - "No FieldGroup"); + private final TextField unboundField = new TextField("No FieldGroup"); private final TestingProperty<String> unboundProp = new TestingProperty<String>( "Hello World"); private final PropertysetItem item = new PropertysetItem(); diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java index 4f0c286d2d..eea5a22ea9 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/AnyEnumToStringConverterTest.java @@ -31,8 +31,7 @@ import com.vaadin.v7.ui.TextField; public class AnyEnumToStringConverterTest { - public class AnyEnumToStringConverter - implements Converter<Enum, String> { + public class AnyEnumToStringConverter implements Converter<Enum, String> { public AnyEnumToStringConverter() { } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java index 1f3a64cbb7..582807fc29 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/converter/ConverterFactoryTest.java @@ -28,8 +28,7 @@ import com.vaadin.v7.ui.TextField; public class ConverterFactoryTest { - public static class ConvertTo42 - implements Converter<String, Integer> { + public static class ConvertTo42 implements Converter<String, Integer> { @Override public Integer convertToModel(String value, @@ -57,8 +56,7 @@ public class ConverterFactoryTest { } - public static class ConverterFactory42 - extends DefaultConverterFactory { + public static class ConverterFactory42 extends DefaultConverterFactory { @Override public <PRESENTATION, MODEL> Converter<PRESENTATION, MODEL> createConverter( Class<PRESENTATION> presentationType, Class<MODEL> modelType) { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java index aa86f92091..0f889cc663 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/CompositeValidatorTest.java @@ -16,10 +16,10 @@ import com.vaadin.v7.data.validator.RegexpValidator; public class CompositeValidatorTest { - CompositeValidator and = new CompositeValidator( - CombinationMode.AND, "One validator not valid"); - CompositeValidator or = new CompositeValidator( - CombinationMode.OR, "No validators are valid"); + CompositeValidator and = new CompositeValidator(CombinationMode.AND, + "One validator not valid"); + CompositeValidator or = new CompositeValidator(CombinationMode.OR, + "No validators are valid"); EmailValidator email = new EmailValidator("Faulty email"); RegexpValidator regex = new RegexpValidator("@mail.com", false, "Partial match validator error"); diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java index 225f344045..511e1c64f8 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/DateRangeValidatorTest.java @@ -30,16 +30,14 @@ public class DateRangeValidatorTest { startDate.set(2000, Calendar.JANUARY, 1, 12, 0, 0); endDate.set(2000, Calendar.FEBRUARY, 20, 12, 0, 0); - cleanValidator = new DateRangeValidator( - "Given date outside range", null, null, Resolution.DAY); - minValidator = new DateRangeValidator( - "Given date before startDate", startDate.getTime(), null, - Resolution.DAY); - maxValidator = new DateRangeValidator("Given date after endDate", - null, endDate.getTime(), Resolution.DAY); - minMaxValidator = new DateRangeValidator( - "Given date outside range", startDate.getTime(), + cleanValidator = new DateRangeValidator("Given date outside range", + null, null, Resolution.DAY); + minValidator = new DateRangeValidator("Given date before startDate", + startDate.getTime(), null, Resolution.DAY); + maxValidator = new DateRangeValidator("Given date after endDate", null, endDate.getTime(), Resolution.DAY); + minMaxValidator = new DateRangeValidator("Given date outside range", + startDate.getTime(), endDate.getTime(), Resolution.DAY); } @Test diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java index 90b6efd610..93072593cd 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/NullValidatorTest.java @@ -10,10 +10,8 @@ import com.vaadin.v7.data.validator.NullValidator; public class NullValidatorTest { - NullValidator notNull = new NullValidator("Null not accepted", - false); - NullValidator onlyNull = new NullValidator("Only null accepted", - true); + NullValidator notNull = new NullValidator("Null not accepted", false); + NullValidator onlyNull = new NullValidator("Only null accepted", true); @Test public void testNullValue() { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java index f08916258e..cad28cd7f1 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/data/validator/RegexpValidatorTest.java @@ -9,10 +9,10 @@ import com.vaadin.v7.data.validator.RegexpValidator; public class RegexpValidatorTest { - private RegexpValidator completeValidator = new RegexpValidator( - "pattern", true, "Complete match validator error"); - private RegexpValidator partialValidator = new RegexpValidator( - "pattern", false, "Partial match validator error"); + private RegexpValidator completeValidator = new RegexpValidator("pattern", + true, "Complete match validator error"); + private RegexpValidator partialValidator = new RegexpValidator("pattern", + false, "Partial match validator error"); @Test public void testRegexpValidatorWithNull() { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java index cb1a6cc0d6..dd0148fdc9 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/SerializationTest.java @@ -22,8 +22,7 @@ public class SerializationTest { @Test public void testValidators() throws Exception { - RegexpValidator validator = new RegexpValidator(".*", - "Error"); + RegexpValidator validator = new RegexpValidator(".*", "Error"); validator.validate("aaa"); RegexpValidator validator2 = serializeAndDeserialize(validator); validator2.validate("aaa"); diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java index e37e19aecb..92e0530722 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/abstractfield/AbstractFieldValueChangeTestBase.java @@ -18,8 +18,8 @@ import com.vaadin.v7.ui.AbstractField; * * Subclasses should implement {@link #setValue()} and call * <code>super.setValue(LegacyAbstractField)</code>. Also, subclasses should - * typically override {@link #setValue(AbstractField)} to set the field - * value via <code>changeVariables()</code>. + * typically override {@link #setValue(AbstractField)} to set the field value + * via <code>changeVariables()</code>. */ public abstract class AbstractFieldValueChangeTestBase<T> { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java index 5b8dac9002..cae04a28f5 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/fieldgroup/BeanFieldGroupTest.java @@ -87,8 +87,7 @@ public class BeanFieldGroupTest { BeanFieldGroup<MyBean> bindFields = BeanFieldGroup .bindFieldsUnbuffered(myBean, viewStub); - Field<String> field = (Field<String>) bindFields - .getField("basicField"); + Field<String> field = (Field<String>) bindFields.getField("basicField"); Assert.assertEquals(DEFAULT_FOR_BASIC_FIELD, myBean.basicField); field.setValue("Foo"); Assert.assertEquals("Foo", myBean.basicField); @@ -132,8 +131,8 @@ public class BeanFieldGroupTest { BeanFieldGroup<MyBean> bfg = new BeanFieldGroup<MyBean>(MyBean.class); bfg.setItemDataSource(bean); - com.vaadin.v7.ui.Field<?> helloField = bfg - .buildAndBind("Hello string", "nestedBean.hello"); + com.vaadin.v7.ui.Field<?> helloField = bfg.buildAndBind("Hello string", + "nestedBean.hello"); assertEquals(bean.nestedBean.hello, helloField.getValue().toString()); } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java index 45ab28d687..cf82c01ebb 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/table/TablePropertyValueConverterTest.java @@ -112,64 +112,60 @@ public class TablePropertyValueConverterTest { } }); - customTable.setConverter("col2", - new Converter<String, BaseClass>() { - private static final long serialVersionUID = 1L; - - @Override - public BaseClass convertToModel(String value, - Class<? extends BaseClass> targetType, - Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return new BaseClass("model"); - } - - @Override - public Class<BaseClass> getModelType() { - return BaseClass.class; - } - - @Override - public Class<String> getPresentationType() { - return String.class; - } - - @Override - public String convertToPresentation(BaseClass value, - Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return null; - } - }); - customTable.setConverter("col3", - new Converter<String, DerivedClass>() { - private static final long serialVersionUID = 1L; - - @Override - public DerivedClass convertToModel(String value, - Class<? extends DerivedClass> targetType, - Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return new DerivedClass("derived" + 1001); - } - - @Override - public Class<DerivedClass> getModelType() { - return DerivedClass.class; - } - - @Override - public Class<String> getPresentationType() { - return String.class; - } - - @Override - public String convertToPresentation(DerivedClass value, - Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return null; - } - }); + customTable.setConverter("col2", new Converter<String, BaseClass>() { + private static final long serialVersionUID = 1L; + + @Override + public BaseClass convertToModel(String value, + Class<? extends BaseClass> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return new BaseClass("model"); + } + + @Override + public Class<BaseClass> getModelType() { + return BaseClass.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + @Override + public String convertToPresentation(BaseClass value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return null; + } + }); + customTable.setConverter("col3", new Converter<String, DerivedClass>() { + private static final long serialVersionUID = 1L; + + @Override + public DerivedClass convertToModel(String value, + Class<? extends DerivedClass> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return new DerivedClass("derived" + 1001); + } + + @Override + public Class<DerivedClass> getModelType() { + return DerivedClass.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + + @Override + public String convertToPresentation(DerivedClass value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return null; + } + }); customTable.setContainerDataSource( createContainer(new String[] { "col1", "col2", "col3" }, new Class[] { DerivedClass.class, DerivedClass.class, @@ -191,34 +187,33 @@ public class TablePropertyValueConverterTest { createContainer(new String[] { "col1", "col2", "col3" }, new Class[] { int.class, BaseClass.class, DerivedClass.class })); - customTable.setConverter("col1", - new Converter<String, Integer>() { - private static final long serialVersionUID = 1L; - - @Override - public Integer convertToModel(String value, - Class<? extends Integer> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return 11; - } - - @Override - public String convertToPresentation(Integer value, - Class<? extends String> targetType, Locale locale) - throws com.vaadin.v7.data.util.converter.Converter.ConversionException { - return "presentation"; - } - - @Override - public Class<Integer> getModelType() { - return Integer.class; - } - - @Override - public Class<String> getPresentationType() { - return String.class; - } - }); + customTable.setConverter("col1", new Converter<String, Integer>() { + private static final long serialVersionUID = 1L; + + @Override + public Integer convertToModel(String value, + Class<? extends Integer> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return 11; + } + + @Override + public String convertToPresentation(Integer value, + Class<? extends String> targetType, Locale locale) + throws com.vaadin.v7.data.util.converter.Converter.ConversionException { + return "presentation"; + } + + @Override + public Class<Integer> getModelType() { + return Integer.class; + } + + @Override + public Class<String> getPresentationType() { + return String.class; + } + }); Set<Object> converters = customTable.getCurrentConverters(); assertTrue("Converter was not set.", converters.size() > 0); } diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java index 79f1640257..9b5d4ea0a1 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldTest.java @@ -31,8 +31,7 @@ public class TextFieldTest { @Test public void emptyAfterClearUsingPDS() { - TextField tf = new TextField( - new ObjectProperty<String>("foo")); + TextField tf = new TextField(new ObjectProperty<String>("foo")); Assert.assertFalse(tf.isEmpty()); tf.clear(); Assert.assertTrue(tf.isEmpty()); diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java index bbbe41c24b..b69e53f62f 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/textfield/TextFieldWithValidatorTest.java @@ -152,8 +152,8 @@ public class TextFieldWithValidatorTest { @Test public void testRegexpValidator() { - field.addValidator(new RegexpValidator("pattern", true, - "Validation failed")); + field.addValidator( + new RegexpValidator("pattern", true, "Validation failed")); field.setRequired(false); // succeeds diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java index cb1b1bd918..a5a8e1e2c0 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/renderer/RendererTest.java @@ -65,8 +65,7 @@ public class RendererTest { } } - private static class TestConverter - implements Converter<String, TestBean> { + private static class TestConverter implements Converter<String, TestBean> { @Override public TestBean convertToModel(String value, diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java index 990acbab61..a16729da03 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/BeanValidationTest.java @@ -12,58 +12,58 @@ import com.vaadin.v7.ui.Field; public class BeanValidationTest { @Test(expected = InvalidValueException.class) public void testBeanValidationNull() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "firstname"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "firstname"); validator.validate(null); } @Test(expected = InvalidValueException.class) public void testBeanValidationStringTooShort() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "firstname"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "firstname"); validator.validate("aa"); } @Test public void testBeanValidationStringOk() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "firstname"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "firstname"); validator.validate("aaa"); } @Test(expected = InvalidValueException.class) public void testBeanValidationIntegerTooSmall() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "age"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "age"); validator.validate(17); } @Test public void testBeanValidationIntegerOk() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "age"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "age"); validator.validate(18); } @Test(expected = InvalidValueException.class) public void testBeanValidationTooManyDigits() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "decimals"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "decimals"); validator.validate("1234.567"); } @Test public void testBeanValidationDigitsOk() { - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "decimals"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "decimals"); validator.validate("123.45"); } @Test public void testBeanValidationException_OneValidationError() { InvalidValueException[] causes = null; - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "lastname"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "lastname"); try { validator.validate(null); } catch (InvalidValueException e) { @@ -76,8 +76,8 @@ public class BeanValidationTest { @Test public void testBeanValidationsException_TwoValidationErrors() { InvalidValueException[] causes = null; - BeanValidator validator = new BeanValidator( - BeanToValidate.class, "nickname"); + BeanValidator validator = new BeanValidator(BeanToValidate.class, + "nickname"); try { validator.validate("A"); } catch (InvalidValueException e) { diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java index 98e9c56eae..c6f86afb63 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/validation/RangeValidatorTest.java @@ -14,8 +14,7 @@ public class RangeValidatorTest { // RangeValidator @Test public void testMinValueNonInclusive() { - IntegerRangeValidator iv = new IntegerRangeValidator( - "Failed", 0, 10); + IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10); iv.setMinValueIncluded(false); assertFalse(iv.isValid(0)); assertTrue(iv.isValid(10)); @@ -25,8 +24,7 @@ public class RangeValidatorTest { @Test public void testMinMaxValuesInclusive() { - IntegerRangeValidator iv = new IntegerRangeValidator( - "Failed", 0, 10); + IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10); assertTrue(iv.isValid(0)); assertTrue(iv.isValid(1)); assertTrue(iv.isValid(10)); @@ -36,8 +34,7 @@ public class RangeValidatorTest { @Test public void testMaxValueNonInclusive() { - IntegerRangeValidator iv = new IntegerRangeValidator( - "Failed", 0, 10); + IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10); iv.setMaxValueIncluded(false); assertTrue(iv.isValid(0)); assertTrue(iv.isValid(9)); @@ -48,8 +45,7 @@ public class RangeValidatorTest { @Test public void testMinMaxValuesNonInclusive() { - IntegerRangeValidator iv = new IntegerRangeValidator( - "Failed", 0, 10); + IntegerRangeValidator iv = new IntegerRangeValidator("Failed", 0, 10); iv.setMinValueIncluded(false); iv.setMaxValueIncluded(false); |