diff options
134 files changed, 448 insertions, 560 deletions
diff --git a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java index 68993324c4..358e10c7a4 100644 --- a/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java +++ b/client-compiler/src/main/java/com/vaadin/server/widgetsetutils/metadata/RendererVisitor.java @@ -142,7 +142,8 @@ public class RendererVisitor extends TypeVisitor { + AbstractRendererConnector.class.getName()); } - private static boolean isAbstractRendererConnector(String connectorSrcName) { + private static boolean isAbstractRendererConnector( + String connectorSrcName) { return connectorSrcName .equals(AbstractRendererConnector.class.getName()) || connectorSrcName diff --git a/client/src/main/java/com/vaadin/client/BrowserInfo.java b/client/src/main/java/com/vaadin/client/BrowserInfo.java index 01bb7188bb..ecd4e3fd28 100644 --- a/client/src/main/java/com/vaadin/client/BrowserInfo.java +++ b/client/src/main/java/com/vaadin/client/BrowserInfo.java @@ -520,4 +520,3 @@ public class BrowserInfo { return (getBrowserMajorVersion() > majorVersion); } } - diff --git a/client/src/main/java/com/vaadin/client/LayoutManager.java b/client/src/main/java/com/vaadin/client/LayoutManager.java index f29bc0e01d..48a5ae10e5 100644 --- a/client/src/main/java/com/vaadin/client/LayoutManager.java +++ b/client/src/main/java/com/vaadin/client/LayoutManager.java @@ -1846,4 +1846,3 @@ public class LayoutManager { return false; } } - diff --git a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java index 50f9a98f6e..3e7b8dbb44 100644 --- a/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java +++ b/client/src/main/java/com/vaadin/client/MouseEventDetailsBuilder.java @@ -94,4 +94,3 @@ public class MouseEventDetailsBuilder { } } - diff --git a/client/src/main/java/com/vaadin/client/Util.java b/client/src/main/java/com/vaadin/client/Util.java index 8cfd8547a8..7d7a6483e3 100644 --- a/client/src/main/java/com/vaadin/client/Util.java +++ b/client/src/main/java/com/vaadin/client/Util.java @@ -1260,4 +1260,3 @@ public class Util { return Logger.getLogger(Util.class.getName()); } } - diff --git a/client/src/main/java/com/vaadin/client/WidgetUtil.java b/client/src/main/java/com/vaadin/client/WidgetUtil.java index 1bd270dba3..8ba678e429 100644 --- a/client/src/main/java/com/vaadin/client/WidgetUtil.java +++ b/client/src/main/java/com/vaadin/client/WidgetUtil.java @@ -1775,4 +1775,3 @@ public class WidgetUtil { return integerPart + ((int) nrFractions) / divisor; } } - diff --git a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java index 7abd83b43b..d20f1ca351 100644 --- a/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java +++ b/client/src/main/java/com/vaadin/client/debug/internal/InfoSection.java @@ -312,4 +312,3 @@ public class InfoSection implements Section { } } - diff --git a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java index d2b8d797b4..cf0fc55292 100644 --- a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java +++ b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java @@ -409,4 +409,3 @@ public class ResponsiveConnector extends AbstractExtensionConnector }-*/; } - diff --git a/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java b/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java index f9b2ca585c..3ccdcdbee9 100644 --- a/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java +++ b/client/src/main/java/com/vaadin/client/ui/VAbsoluteLayout.java @@ -497,4 +497,3 @@ public class VAbsoluteLayout extends ComplexPanel { } } } - diff --git a/client/src/main/java/com/vaadin/client/ui/VButton.java b/client/src/main/java/com/vaadin/client/ui/VButton.java index 93e807d148..05f2259e9b 100644 --- a/client/src/main/java/com/vaadin/client/ui/VButton.java +++ b/client/src/main/java/com/vaadin/client/ui/VButton.java @@ -468,4 +468,3 @@ public class VButton extends FocusWidget implements ClickHandler { }-*/; } - diff --git a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java index 550f20c755..013fcbbc68 100644 --- a/client/src/main/java/com/vaadin/client/ui/VFormLayout.java +++ b/client/src/main/java/com/vaadin/client/ui/VFormLayout.java @@ -303,7 +303,8 @@ public class VFormLayout extends SimplePanel { } boolean required = owner instanceof HasRequiredIndicator - && ((HasRequiredIndicator) owner).isRequiredIndicatorVisible(); + && ((HasRequiredIndicator) owner) + .isRequiredIndicatorVisible(); AriaHelper.handleInputRequired(owner.getWidget(), required); diff --git a/client/src/main/java/com/vaadin/client/ui/VLabel.java b/client/src/main/java/com/vaadin/client/ui/VLabel.java index fbea5e7ffe..f3d64108b4 100644 --- a/client/src/main/java/com/vaadin/client/ui/VLabel.java +++ b/client/src/main/java/com/vaadin/client/ui/VLabel.java @@ -58,4 +58,3 @@ public class VLabel extends HTML { } } - diff --git a/client/src/main/java/com/vaadin/client/ui/VUpload.java b/client/src/main/java/com/vaadin/client/ui/VUpload.java index 676d3a4a00..913bec568a 100644 --- a/client/src/main/java/com/vaadin/client/ui/VUpload.java +++ b/client/src/main/java/com/vaadin/client/ui/VUpload.java @@ -391,4 +391,3 @@ public class VUpload extends SimplePanel { } } - diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java index 0f4fb0f816..8755bea650 100644 --- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java +++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/Slot.java @@ -800,4 +800,3 @@ public class Slot extends SimplePanel { } } } - diff --git a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java index a8c1f3ac3d..8a98f95e0c 100644 --- a/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java +++ b/client/src/main/java/com/vaadin/client/ui/orderedlayout/VAbstractOrderedLayout.java @@ -735,4 +735,3 @@ public class VAbstractOrderedLayout extends FlowPanel { } } - diff --git a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java index a52c5d63a9..45e805e781 100644 --- a/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java +++ b/client/src/test/java/com/vaadin/client/VBrowserDetailsUserAgentParserTest.java @@ -568,4 +568,3 @@ public class VBrowserDetailsUserAgentParserTest { } } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java index df12c5aacb..6a94416ad9 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/JavaScriptRendererConnector.java @@ -275,4 +275,3 @@ public class JavaScriptRendererConnector return helper; } } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java index df79ca2497..0ca3b16941 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/connectors/TextRendererConnector.java @@ -25,7 +25,8 @@ import com.vaadin.v7.client.renderers.TextRenderer; * @author Vaadin Ltd */ @Connect(com.vaadin.v7.ui.renderers.TextRenderer.class) -public class TextRendererConnector extends AbstractGridRendererConnector<String> { +public class TextRendererConnector + extends AbstractGridRendererConnector<String> { @Override public TextRenderer getRenderer() { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java index 72d10edb36..8d573a0f38 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/JsniMousewheelHandler.java @@ -72,4 +72,3 @@ abstract class JsniMousewheelHandler { }-*/; } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java index 074e8d23da..75824e6f07 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java @@ -6493,8 +6493,7 @@ public class VScrollTable extends FlowPanel if (!(widget instanceof VLabel) && !(widget instanceof VEmbedded) && !(widget instanceof VTextField - && ((VTextField) widget) - .isReadOnly())) { + && ((VTextField) widget).isReadOnly())) { return null; } } @@ -8419,4 +8418,3 @@ public class VScrollTable extends FlowPanel } } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java index 80b83c9504..8e22672641 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VTree.java @@ -2271,4 +2271,3 @@ public class VTree extends FocusElementPanel Util.notifyParentOfSizeChange(this, false); } } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java index 889e25df33..b834d253dd 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/colorpicker/ColorPickerGridConnector.java @@ -31,8 +31,8 @@ import com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid; /** * A class that defines the default implementation for a color picker grid * connector. Connects the server side - * {@link com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid} with the client - * side counterpart {@link VColorPickerGrid} + * {@link com.vaadin.v7.ui.components.colorpicker.ColorPickerGrid} with the + * client side counterpart {@link VColorPickerGrid} * * @since 7.0.0 */ diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java index fd1927e895..b4198f52da 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/tree/TreeConnector.java @@ -389,4 +389,3 @@ public class TreeConnector extends AbstractComponentConnector WidgetUtil.clearTextSelection(); } } - diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java index 745ffa24cf..f8f4848508 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Escalator.java @@ -673,13 +673,13 @@ public class Escalator extends Widget /*-{ var vScroll = esc.@com.vaadin.v7.client.widgets.Escalator::verticalScrollbar; var vScrollElem = vScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()(); - + var hScroll = esc.@com.vaadin.v7.client.widgets.Escalator::horizontalScrollbar; var hScrollElem = hScroll.@com.vaadin.v7.client.widget.escalator.ScrollbarBundle::getElement()(); - + return $entry(function(e) { var target = e.target; - + // in case the scroll event was native (i.e. scrollbars were dragged, or // the scrollTop/Left was manually modified), the bundles have old cache // values. We need to make sure that the caches are kept up to date. @@ -700,29 +700,29 @@ public class Escalator extends Widget return $entry(function(e) { var deltaX = e.deltaX ? e.deltaX : -0.5*e.wheelDeltaX; var deltaY = e.deltaY ? e.deltaY : -0.5*e.wheelDeltaY; - + // Delta mode 0 is in pixels; we don't need to do anything... - + // A delta mode of 1 means we're scrolling by lines instead of pixels // We need to scale the number of lines by the default line height if(e.deltaMode === 1) { var brc = esc.@com.vaadin.v7.client.widgets.Escalator::body; deltaY *= brc.@com.vaadin.v7.client.widgets.Escalator.AbstractRowContainer::getDefaultRowHeight()(); } - + // Other delta modes aren't supported if((e.deltaMode !== undefined) && (e.deltaMode >= 2 || e.deltaMode < 0)) { var msg = "Unsupported wheel delta mode \"" + e.deltaMode + "\""; - + // Print warning message esc.@com.vaadin.v7.client.widgets.Escalator::logWarning(*)(msg); } - + // IE8 has only delta y if (isNaN(deltaY)) { deltaY = -0.5*e.wheelDelta; } - + @com.vaadin.v7.client.widgets.Escalator.JsniUtil::moveScrollFromEvent(*)(esc, deltaX, deltaY, e); }); }-*/; diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java index 35874b5d4b..9069c95e41 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java @@ -201,9 +201,9 @@ import com.vaadin.v7.shared.ui.grid.ScrollDestination; * might have a {@link com.vaadin.v7.client.renderers.TextRenderer TextRenderer} * that simply takes in a {@code String} and displays it as the cell's content. * A more complex renderer might be - * {@link com.vaadin.v7.client.renderers.ProgressBarRenderer ProgressBarRenderer} - * that takes in a floating point number, and displays a progress bar instead, - * based on the given number. + * {@link com.vaadin.v7.client.renderers.ProgressBarRenderer + * ProgressBarRenderer} that takes in a floating point number, and displays a + * progress bar instead, based on the given number. * <p> * <em>See:</em> {@link #addColumn(Column)}, {@link #addColumn(Column, int)} and * {@link #addColumns(Column...)}. <em>Also</em> 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); diff --git a/server/src/main/java/com/vaadin/data/BeanBinder.java b/server/src/main/java/com/vaadin/data/BeanBinder.java index 499ca22bd9..18985bc90c 100644 --- a/server/src/main/java/com/vaadin/data/BeanBinder.java +++ b/server/src/main/java/com/vaadin/data/BeanBinder.java @@ -56,8 +56,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { * @param <TARGET> * the target property type */ - public interface BeanBinding<BEAN, FIELDVALUE, TARGET> extends - Binding<BEAN, FIELDVALUE, TARGET> { + public interface BeanBinding<BEAN, FIELDVALUE, TARGET> + extends Binding<BEAN, FIELDVALUE, TARGET> { @Override public BeanBinding<BEAN, FIELDVALUE, TARGET> withValidator( @@ -127,8 +127,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { * @param <TARGET> * the target property type */ - protected static class BeanBindingImpl<BEAN, FIELDVALUE, TARGET> extends - BindingImpl<BEAN, FIELDVALUE, TARGET> + protected static class BeanBindingImpl<BEAN, FIELDVALUE, TARGET> + extends BindingImpl<BEAN, FIELDVALUE, TARGET> implements BeanBinding<BEAN, FIELDVALUE, TARGET> { private Method getter; @@ -218,7 +218,8 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { } catch (IntrospectionException ie) { throw new IllegalArgumentException( "Could not resolve bean property name (see the cause): " - + beanType.getName() + "." + propertyName, ie); + + beanType.getName() + "." + propertyName, + ie); } if (descriptor == null) { throw new IllegalArgumentException( @@ -237,8 +238,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { private Converter<TARGET, Object> createConverter() { return Converter.from( fieldValue -> getter.getReturnType().cast(fieldValue), - propertyValue -> (TARGET) propertyValue, - exception -> { + propertyValue -> (TARGET) propertyValue, exception -> { throw new RuntimeException(exception); }); } @@ -312,8 +312,7 @@ public class BeanBinder<BEAN> extends Binder<BEAN> { @Override protected <FIELDVALUE, TARGET> BeanBindingImpl<BEAN, FIELDVALUE, TARGET> createBinding( - HasValue<FIELDVALUE> field, - Converter<FIELDVALUE, TARGET> converter, + HasValue<FIELDVALUE> field, Converter<FIELDVALUE, TARGET> converter, StatusChangeHandler handler) { Objects.requireNonNull(field, "field cannot be null"); Objects.requireNonNull(converter, "converter cannot be null"); diff --git a/server/src/main/java/com/vaadin/data/HasValue.java b/server/src/main/java/com/vaadin/data/HasValue.java index 86b97be9c0..2130aef4c6 100644 --- a/server/src/main/java/com/vaadin/data/HasValue.java +++ b/server/src/main/java/com/vaadin/data/HasValue.java @@ -28,10 +28,10 @@ import com.vaadin.shared.Registration; * changed, either by the user or programmatically. * * @author Vaadin Ltd. - * + * * @param <V> * the value type - * + * * @since */ public interface HasValue<V> extends Serializable { @@ -67,7 +67,7 @@ public interface HasValue<V> extends Serializable { /** * Creates a new {@code ValueChange} event containing the given value, * originating from the given source connector. - * + * * @param source * the source connector, not null * @param value diff --git a/server/src/main/java/com/vaadin/data/Listing.java b/server/src/main/java/com/vaadin/data/Listing.java index 38cfecb9bb..8d35a231de 100644 --- a/server/src/main/java/com/vaadin/data/Listing.java +++ b/server/src/main/java/com/vaadin/data/Listing.java @@ -32,8 +32,8 @@ import com.vaadin.shared.data.selection.SelectionModel; * the selection logic supported by this listing * @since */ -public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends - Serializable { +public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> + extends Serializable { /** * Returns the source of data items used by this listing. @@ -53,7 +53,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends /** * Returns the selection model for this listing. - * + * * @return the selection model, not null */ SELECTIONMODEL getSelectionModel(); @@ -63,7 +63,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends * * @param items * the data items to display - * + * */ default void setItems(Collection<T> items) { setDataSource(DataSource.create(items)); @@ -85,9 +85,9 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends * Returns an immutable set of the currently selected items. The iteration * order of the items in the returned set is specified by the * {@linkplain #getSelectionModel() selection model} used. - * + * * @return the current selection - * + * * @see SelectionModel#getSelectedItems */ default Set<T> getSelectedItems() { @@ -96,10 +96,10 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends /** * Selects the given item. If the item is already selected, does nothing. - * + * * @param item * the item to select, not null - * + * * @see SelectionModel#select */ default void select(T item) { @@ -109,10 +109,10 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends /** * Deselects the given item. If the item is not currently selected, does * nothing. - * + * * @param item * the item to deselect, not null - * + * * @see SelectionModel#deselect */ default void deselect(T item) { @@ -121,7 +121,7 @@ public interface Listing<T, SELECTIONMODEL extends SelectionModel<T>> extends /** * Returns whether the given item is currently selected. - * + * * @param item * the item to check, not null * @return {@code true} if the item is selected, {@code false} otherwise diff --git a/server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java b/server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java index 8294df0918..cf83291b48 100644 --- a/server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java +++ b/server/src/main/java/com/vaadin/data/selection/AbstractSelectionModel.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2016 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -23,12 +23,12 @@ import elemental.json.JsonObject; /** * An astract base class for {@code SelectionModel}s. - * + * * @author Vaadin Ltd. - * + * * @param <T> * type of selected data - * + * * @since */ public abstract class AbstractSelectionModel<T> extends diff --git a/server/src/main/java/com/vaadin/data/selection/SingleSelection.java b/server/src/main/java/com/vaadin/data/selection/SingleSelection.java index 6bb0ac5f66..9ede5b104c 100644 --- a/server/src/main/java/com/vaadin/data/selection/SingleSelection.java +++ b/server/src/main/java/com/vaadin/data/selection/SingleSelection.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2016 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -31,12 +31,12 @@ import com.vaadin.util.ReflectTools; * A {@code SelectionModel} for selecting a single value. Implements * {@code Extension} to provide the communication logic for single selection for * the listing it extends. - * + * * @author Vaadin Ltd. - * + * * @param <T> * the type of the items to select - * + * * @since */ public class SingleSelection<T> extends AbstractSelectionModel<T> @@ -52,7 +52,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T> /** * Creates a new selection change event. - * + * * @param source * the listing that fired the event * @param selectedItem @@ -69,7 +69,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T> /** * Returns an optional of the item that was selected, or an empty * optional if a previously selected item was deselected. - * + * * @return the selected item or an empty optional if deselected * * @see SelectionModel.Single#getSelectedItem() @@ -81,10 +81,10 @@ public class SingleSelection<T> extends AbstractSelectionModel<T> /** * A listener for selection events. - * + * * @param <T> * the type of the selected item - * + * * @see SingleSelectionChange */ @FunctionalInterface @@ -102,7 +102,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T> /** * Creates a new {@code SingleSelection} extending the given parent listing. - * + * * @param parent * the parent listing */ @@ -170,7 +170,7 @@ public class SingleSelection<T> extends AbstractSelectionModel<T> /** * Selects the given item or deselects the current one if given * {@code null}. - * + * * @param value * the item to select or {@code null} to deselect * @param userOriginated diff --git a/server/src/main/java/com/vaadin/data/util/BeanUtil.java b/server/src/main/java/com/vaadin/data/util/BeanUtil.java index c2aae29629..579eb08b68 100644 --- a/server/src/main/java/com/vaadin/data/util/BeanUtil.java +++ b/server/src/main/java/com/vaadin/data/util/BeanUtil.java @@ -96,8 +96,7 @@ public final class BeanUtil implements Serializable { * if the introspection fails */ public static Class<?> getPropertyType(Class<?> beanType, - String propertyName) - throws IntrospectionException { + String propertyName) throws IntrospectionException { PropertyDescriptor descriptor = getPropertyDescriptor(beanType, propertyName); if (descriptor != null) { diff --git a/server/src/main/java/com/vaadin/data/validator/BeanValidator.java b/server/src/main/java/com/vaadin/data/validator/BeanValidator.java index 76f7a958aa..3b779b822d 100644 --- a/server/src/main/java/com/vaadin/data/validator/BeanValidator.java +++ b/server/src/main/java/com/vaadin/data/validator/BeanValidator.java @@ -73,8 +73,8 @@ public class BeanValidator implements Validator<Object> { Class.forName(Validation.class.getName()); beanValidationAvailable = true; } catch (ClassNotFoundException e) { - Logger.getLogger(BeanValidator.class.getName()).fine( - "A JSR-303 bean validation implementation not found on the classpath. " + Logger.getLogger(BeanValidator.class.getName()) + .fine("A JSR-303 bean validation implementation not found on the classpath. " + BeanValidator.class.getSimpleName() + " cannot be used."); beanValidationAvailable = false; diff --git a/server/src/main/java/com/vaadin/event/EventListener.java b/server/src/main/java/com/vaadin/event/EventListener.java index c5bb811712..4bce75245a 100644 --- a/server/src/main/java/com/vaadin/event/EventListener.java +++ b/server/src/main/java/com/vaadin/event/EventListener.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2016 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -19,12 +19,12 @@ import java.util.function.Consumer; /** * A generic interface for connector event listeners. - * + * * @author Vaadin Ltd. * * @param <EVENT> * the event type - * + * * @since 8.0 */ @FunctionalInterface diff --git a/server/src/main/java/com/vaadin/server/data/DataGenerator.java b/server/src/main/java/com/vaadin/server/data/DataGenerator.java index 8eda632167..a8c3c6e4b7 100644 --- a/server/src/main/java/com/vaadin/server/data/DataGenerator.java +++ b/server/src/main/java/com/vaadin/server/data/DataGenerator.java @@ -24,10 +24,10 @@ import elemental.json.JsonObject; * data items sent to the client for extension purposes. * * @author Vaadin Ltd. - * + * * @param <T> * the data type - * + * * @since */ @FunctionalInterface diff --git a/server/src/main/java/com/vaadin/ui/AbstractListing.java b/server/src/main/java/com/vaadin/ui/AbstractListing.java index 45c81fc7bd..2854903463 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractListing.java +++ b/server/src/main/java/com/vaadin/ui/AbstractListing.java @@ -27,14 +27,14 @@ import com.vaadin.shared.data.selection.SelectionModel; /** * A base class for listing components. Provides common handling for fetching * backend data items, selection logic, and server-client communication. - * + * * @author Vaadin Ltd. - * + * * @param <T> * the item data type * @param <SELECTIONMODEL> * the selection logic supported by this listing - * + * * @since */ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T>> @@ -53,7 +53,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T /** * Adds this extension to the given parent listing. - * + * * @param listing * the parent component to add to */ @@ -124,7 +124,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T * <strong>Note:</strong> This constructor does not set a selection model * for the new listing. The invoking constructor must explicitly call * {@link #setSelectionModel(SelectionModel)}. - * + * * @param dataCommunicator * the data communicator to use, not null */ @@ -155,7 +155,7 @@ public abstract class AbstractListing<T, SELECTIONMODEL extends SelectionModel<T /** * Sets the selection model for this listing. - * + * * @param model * the selection model to use, not null */ diff --git a/server/src/test/java/com/vaadin/data/BeanBinderTest.java b/server/src/test/java/com/vaadin/data/BeanBinderTest.java index a3e4d4b992..6b535c53a6 100644 --- a/server/src/test/java/com/vaadin/data/BeanBinderTest.java +++ b/server/src/test/java/com/vaadin/data/BeanBinderTest.java @@ -146,8 +146,8 @@ public class BeanBinderTest { @Test public void fieldWithConverterBound_bindBean_fieldValueUpdated() { - binder.forField(ageField).withConverter(Integer::valueOf, - String::valueOf).bind("age"); + binder.forField(ageField) + .withConverter(Integer::valueOf, String::valueOf).bind("age"); binder.bind(p); assertEquals("32", ageField.getValue()); @@ -155,8 +155,8 @@ public class BeanBinderTest { @Test(expected = ClassCastException.class) public void fieldWithInvalidConverterBound_bindBean_fieldValueUpdated() { - binder.forField(ageField).withConverter(Float::valueOf, - String::valueOf).bind("age"); + binder.forField(ageField).withConverter(Float::valueOf, String::valueOf) + .bind("age"); binder.bind(p); assertEquals("32", ageField.getValue()); diff --git a/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java b/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java index 98080669a3..607bfebeae 100644 --- a/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java +++ b/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/SelectElement.java @@ -3,7 +3,6 @@ package com.vaadin.v7.testbench.customelements; import com.vaadin.testbench.elementsbase.ServerClass; @ServerClass("com.vaadin.v7.ui.Select") -public class SelectElement - extends com.vaadin.testbench.elements.SelectElement { +public class SelectElement extends com.vaadin.testbench.elements.SelectElement { } diff --git a/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java b/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java index 2ce3d84e78..ab9811d7e0 100644 --- a/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java +++ b/uitest-common/src/main/java/com/vaadin/v7/testbench/customelements/TreeElement.java @@ -3,7 +3,6 @@ package com.vaadin.v7.testbench.customelements; import com.vaadin.testbench.elementsbase.ServerClass; @ServerClass("com.vaadin.v7.ui.Tree") -public class TreeElement - extends com.vaadin.testbench.elements.TreeElement { +public class TreeElement extends com.vaadin.testbench.elements.TreeElement { } diff --git a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java index 0521399eb0..2f6443fa14 100644 --- a/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java +++ b/uitest/src/main/java/com/vaadin/tests/application/CommErrorEmulatorUI.java @@ -228,13 +228,11 @@ public class CommErrorEmulatorUI extends AbstractTestUIWithLog { hl.setSpacing(true); hl.setDefaultComponentAlignment(Alignment.MIDDLE_LEFT); Label l1 = new Label("Respond to " + type + " requests with code"); - final TextField responseCode = new TextField(null, - "" + response.code); + final TextField responseCode = new TextField(null, "" + response.code); responseCode.setConverter(Integer.class); responseCode.setWidth("5em"); Label l2 = new Label("for the following"); - final TextField timeField = new TextField(null, - "" + response.time); + final TextField timeField = new TextField(null, "" + response.time); timeField.setConverter(Integer.class); timeField.setWidth("5em"); Label l3 = new Label("seconds"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java index 18936f0a93..1822cceb80 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java +++ b/uitest/src/main/java/com/vaadin/tests/components/DisableEnableCascadeStyles.java @@ -36,8 +36,7 @@ public class DisableEnableCascadeStyles extends TestBase { button = new Button("Button, enabled"); nativeButton = new NativeButton("NativeButton, enabled"); - textField = new TextField( - "TextField with caption and value, enabled"); + textField = new TextField("TextField with caption and value, enabled"); textField.setValue("Text"); textArea = new TextArea("TextArea with caption and value, enabled"); textArea.setValue("Text"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java b/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java index 6e49ee50d6..59b1e86483 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java +++ b/uitest/src/main/java/com/vaadin/tests/components/ErrorMessages.java @@ -20,8 +20,7 @@ public class ErrorMessages extends TestBase { bb.setComponentError(new CompositeErrorMessage(errors)); addComponent(bb); - TextField tf = new TextField("", - "Textfield with UserError"); + TextField tf = new TextField("", "Textfield with UserError"); tf.setComponentError(new UserError("This is a failure")); addComponent(tf); diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java index 11a8dccfb0..7eb79e123a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/DoubleInTextField.java @@ -15,14 +15,12 @@ public class DoubleInTextField extends AbstractComponentDataBindingTest { new Address("Dovestreet 12", 12233, "Johnston", Country.SOUTH_AFRICA)); - TextField salary = new TextField( - "Vaadin 7 - TextField with Double"); + TextField salary = new TextField("Vaadin 7 - TextField with Double"); addComponent(salary); salary.setPropertyDataSource( new MethodProperty<Double>(person, "salaryDouble")); - TextField salary6 = new TextField( - "Vaadin 6 - TextField with Double"); + TextField salary6 = new TextField("Vaadin 6 - TextField with Double"); addComponent(salary6); salary6.setPropertyDataSource( new MethodProperty<Double>(person, "salaryDouble")); diff --git a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java index 2262258460..7829adf626 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/abstractfield/LegacyAbstractFieldTest.java @@ -141,7 +141,8 @@ public abstract class LegacyAbstractFieldTest<T extends AbstractField> }; @Override - public void valueChange(com.vaadin.v7.data.Property.ValueChangeEvent event) { + public void valueChange( + com.vaadin.v7.data.Property.ValueChangeEvent event) { log(event.getClass().getSimpleName() + ", new value: " + getValue(event.getProperty())); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java index 0b0382dcae..6ad4e6f5a1 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java +++ b/uitest/src/main/java/com/vaadin/tests/components/button/ButtonTabIndex.java @@ -26,8 +26,7 @@ public class ButtonTabIndex extends TestBase { protected void setup() { TextField tf1 = new TextField("Tab index 0"); tf1.setTabIndex(0); - TextField tf2 = new TextField( - "Tab index -1, focused initially"); + TextField tf2 = new TextField("Tab index -1, focused initially"); tf2.setTabIndex(-1); tf2.focus(); addComponent(tf1); diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java index 77b9b1a2c4..cabd19d1ee 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java +++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutUsingTemplate.java @@ -61,8 +61,7 @@ public class CustomLayoutUsingTemplate extends TestBase if (event.getButton() == button1) { layout.addComponent(button2, "location1"); } else { - layout.addComponent(new TextField("A text field!"), - "location2"); + layout.addComponent(new TextField("A text field!"), "location2"); } } } diff --git a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java index 8cc2bab5ba..cae4a1ecd4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java +++ b/uitest/src/main/java/com/vaadin/tests/components/customlayout/CustomLayoutWithMissingSlot.java @@ -35,8 +35,7 @@ public class CustomLayoutWithMissingSlot extends AbstractTestUIWithLog { cl = new CustomLayout(new ByteArrayInputStream( "<div>First: <div location='first'></div><p>Second: <div location='second'></div><p>" .getBytes("UTF-8"))); - cl.addComponent(new TextField("This should be visible"), - "first"); + cl.addComponent(new TextField("This should be visible"), "first"); Button button = new Button( "This button is visible, together with one label"); button.addClickListener(new ClickListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java index 2d0eeeee97..36e58e0b13 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/LegacyDateFieldRanges.java @@ -201,11 +201,11 @@ public class LegacyDateFieldRanges extends AbstractTestUI { endCal.add(Calendar.DATE, 30); GridLayout gl = new GridLayout(2, 2); gl.setSpacing(true); - DateField df = createDateField(startCal.getTime(), - endCal.getTime(), null, Resolution.DAY, false); + DateField df = createDateField(startCal.getTime(), endCal.getTime(), + null, Resolution.DAY, false); gl.addComponent(df); - DateField inline = createDateField(startCal.getTime(), - endCal.getTime(), null, Resolution.DAY, true); + DateField inline = createDateField(startCal.getTime(), endCal.getTime(), + null, Resolution.DAY, true); gl.addComponent(inline); inline.setId("staticInline"); VerticalLayout vl = new VerticalLayout(); diff --git a/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java b/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java index 327fe33b97..d4c48ac47e 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java +++ b/uitest/src/main/java/com/vaadin/tests/components/datefield/RequiredInvalidDateField.java @@ -55,8 +55,7 @@ public class RequiredInvalidDateField extends TestBase { // not required Property<Date> dateProperty1 = new ObjectProperty<Date>(date); - DateField dateField1 = new DateField("Not required", - dateProperty1); + DateField dateField1 = new DateField("Not required", dateProperty1); dateField1.setLocale(new Locale("fi", "FI")); dateField1.setResolution(DateField.RESOLUTION_DAY); dateField1.setId("_DF1"); @@ -66,8 +65,7 @@ public class RequiredInvalidDateField extends TestBase { // required Property<Date> dateProperty2 = new ObjectProperty<Date>(date); - DateField dateField2 = new DateField("Required", - dateProperty2); + DateField dateField2 = new DateField("Required", dateProperty2); dateField2.setLocale(new Locale("fi", "FI")); dateField2.setResolution(DateField.RESOLUTION_DAY); dateField2.setId("_DF2"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java b/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java index 9f3cadc995..eb1e82e440 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java +++ b/uitest/src/main/java/com/vaadin/tests/components/formlayout/HtmlCaptionInFormLayout.java @@ -25,12 +25,10 @@ import com.vaadin.v7.ui.TextField; public class HtmlCaptionInFormLayout extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - final TextField asHtml = new TextField( - "Contains <b>HTML</b>"); + final TextField asHtml = new TextField("Contains <b>HTML</b>"); asHtml.setCaptionAsHtml(true); - final TextField asText = new TextField( - "Contains <b>HTML</b>"); + final TextField asText = new TextField("Contains <b>HTML</b>"); addComponent(new FormLayout(asHtml, asText)); diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java index 1beb2e242d..6abcf8cfc4 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridEditorUI.java @@ -41,8 +41,8 @@ public class GridEditorUI extends AbstractTestUI { grid.getColumn("firstName").setEditorField(new PasswordField()); - TextField lastNameField = (TextField) grid - .getColumn("lastName").getEditorField(); + TextField lastNameField = (TextField) grid.getColumn("lastName") + .getEditorField(); lastNameField.setMaxLength(50); grid.getColumn("phoneNumber").getEditorField().setReadOnly(true); diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java index 65c46c1320..825f42d214 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridThemeUI.java @@ -96,8 +96,8 @@ public class GridThemeUI extends AbstractTestUIWithLog { getColumn("lastName").setEditable(false); setSizeFull(); getColumn("age").getEditorField().addValidator( - new IntegerRangeValidator("Must be between 0 and 100", - 0, 100)); + new IntegerRangeValidator("Must be between 0 and 100", 0, + 100)); getColumn("birthDate").setRenderer(new DateRenderer( DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); } @@ -136,8 +136,8 @@ public class GridThemeUI extends AbstractTestUIWithLog { setEditorEnabled(true); setSizeFull(); getColumn("age").getEditorField().addValidator( - new IntegerRangeValidator("Must be between 0 and 100", - 0, 100)); + new IntegerRangeValidator("Must be between 0 and 100", 0, + 100)); getColumn("birthDate").setRenderer(new DateRenderer( DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); diff --git a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java index 23779a9914..e866db5426 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java +++ b/uitest/src/main/java/com/vaadin/tests/components/gridlayout/GridLayoutRequiredIndicatorLocation.java @@ -110,8 +110,7 @@ public class GridLayoutRequiredIndicatorLocation extends AbstractTestUI { layout.addComponent(label); // TODO also test with captions - TextField field = new TextField( - useCaption ? "caption" : null); + TextField field = new TextField(useCaption ? "caption" : null); field.setRequired(true); field.setWidth(width); layout.addComponent(field); @@ -120,8 +119,7 @@ public class GridLayoutRequiredIndicatorLocation extends AbstractTestUI { private void addLabel(VerticalLayout layout, String width, Alignment alignment, boolean useCaption) { - TextField field = new TextField( - useCaption ? "caption" : null); + TextField field = new TextField(useCaption ? "caption" : null); field.setRequired(true); field.setWidth(width); layout.addComponent(field); diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java index fe8cafa1a1..6339615104 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/BoxLayoutTest.java @@ -403,8 +403,8 @@ public class BoxLayoutTest extends AbstractTestUI { componentIcon.setEnabled(target != null); componentDescription.setEnabled(target != null); componentError.setEnabled(target != null); - componentRequired.setEnabled(target != null - && target instanceof AbstractField); + componentRequired.setEnabled( + target != null && target instanceof AbstractField); align.setEnabled(target != null); expand.setEnabled(target != null); if (target != null) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java index bb52813fe4..6be6d6e497 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java +++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VerticalLayoutWithEmptyLabel.java @@ -121,8 +121,7 @@ public class VerticalLayoutWithEmptyLabel extends AbstractTestUI { private final Label myLabel = new Label(""); private final TextField filterPhoneField = new TextField( "Foobar Number"); - private final TextField filterFoobarField = new TextField( - "Foobar ID"); + private final TextField filterFoobarField = new TextField("Foobar ID"); private final CheckBox incomingOnlyField = new CheckBox( "Incoming foobar only"); @@ -147,8 +146,7 @@ public class VerticalLayoutWithEmptyLabel extends AbstractTestUI { this.addComponent(topLayout); // Foobar phone # - final TextField smsNumber = new TextField( - "Foobar Phone #"); + final TextField smsNumber = new TextField("Foobar Phone #"); smsNumber.setSizeUndefined(); smsNumber.setColumns(12); smsNumber.setMaxLength(16); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java index b3766d4ac4..59f5d3e49a 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableUnregisterComponent.java @@ -50,8 +50,8 @@ public class TableUnregisterComponent extends TestBase { table.setColumnCollapsingAllowed(true); table.setTableFieldFactory(new DefaultFieldFactory() { @Override - public Field<?> createField(Container container, - Object itemId, Object propertyId, Component uiContext) { + public Field<?> createField(Container container, Object itemId, + Object propertyId, Component uiContext) { if (COL_B.equals(propertyId)) { Field<String> field = new TextField() { @Override diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java index da8284a0e6..94bbe1821b 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/TableWithCustomConverterFactory.java @@ -55,8 +55,7 @@ public class TableWithCustomConverterFactory extends AbstractTestUI { } - public static class MyConverterFactory - extends DefaultConverterFactory { + public static class MyConverterFactory extends DefaultConverterFactory { @Override protected Converter<String, ?> createStringConverter( Class<?> sourceType) { diff --git a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIcons.java b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIcons.java index dfd871dfc5..325ccf33f1 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIcons.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tabsheet/TabSheetIcons.java @@ -39,8 +39,7 @@ public class TabSheetIcons extends TestBase { tab[0] = new Label("This is tab 1"); tab[0].setIcon(new ThemeResource("../runo/icons/32/folder-add.png")); tab[0].setCaption("tab number 1"); - tab[1] = new TextField("This is tab 2", - "Contents of tab 2 textfield"); + tab[1] = new TextField("This is tab 2", "Contents of tab 2 textfield"); tab[2] = new Label("This is tab 3"); tab[2].setIcon(new ThemeResource("../runo/icons/16/folder-add.png")); tab[2].setCaption("tab number 3"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java index 5bccccb933..352bf86423 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/BigDecimalTextField.java @@ -58,8 +58,7 @@ public class BigDecimalTextField extends AbstractTestUIWithLog { Button setValue = new Button("Set value to 15,2", new ClickListener() { @Override public void buttonClick(ClickEvent event) { - ((TextField) fieldGroup.getField("decimal")) - .setValue("15,2"); + ((TextField) fieldGroup.getField("decimal")).setValue("15,2"); } }); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java index 5f3fc312d4..a9920c2ead 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textfield/TextFieldWithDataSourceAndInputPrompt.java @@ -35,8 +35,7 @@ public class TextFieldWithDataSourceAndInputPrompt extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { - TextField textField = new TextField( - "TextField with null value"); + TextField textField = new TextField("TextField with null value"); textField.setInputPrompt("Me is input prompt"); textField.setNullRepresentation(null); textField.setValue(null); diff --git a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java index 84227ed599..dbe64a5355 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java +++ b/uitest/src/main/java/com/vaadin/tests/components/tree/Trees.java @@ -388,8 +388,8 @@ public class Trees extends AbstractSelectTestCase<Tree> private Command<Tree, com.vaadin.v7.ui.Tree.ItemStyleGenerator> itemStyleGeneratorCommand = new Command<Tree, com.vaadin.v7.ui.Tree.ItemStyleGenerator>() { @Override - public void execute(Tree c, com.vaadin.v7.ui.Tree.ItemStyleGenerator value, - Object data) { + public void execute(Tree c, + com.vaadin.v7.ui.Tree.ItemStyleGenerator value, Object data) { c.setItemStyleGenerator(value); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/ui/LoadingIndicatorConfigurationTest.java b/uitest/src/main/java/com/vaadin/tests/components/ui/LoadingIndicatorConfigurationTest.java index 9a540ae006..093cf2d7d5 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/ui/LoadingIndicatorConfigurationTest.java +++ b/uitest/src/main/java/com/vaadin/tests/components/ui/LoadingIndicatorConfigurationTest.java @@ -74,8 +74,7 @@ public class LoadingIndicatorConfigurationTest extends AbstractTestUIWithLog { } - private TextField createIntegerTextField(String caption, - int initialValue) { + private TextField createIntegerTextField(String caption, int initialValue) { TextField tf = new TextField(caption); tf.setId(caption); tf.setConverter(Integer.class); diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java index 72c0efb8b5..6b621653d5 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java +++ b/uitest/src/main/java/com/vaadin/tests/components/window/SubWindowFocusAndBlurListeners.java @@ -73,8 +73,7 @@ public class SubWindowFocusAndBlurListeners extends TestBase { main.addWindow(window); - ((ComponentContainer) main.getContent()) - .addComponent(new TextField()); + ((ComponentContainer) main.getContent()).addComponent(new TextField()); Button button = new Button("Bring to front (should focus too)", new Button.ClickListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java index 7ba28c46f7..ca200cc5e8 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/AbstractBasicCrud.java @@ -115,13 +115,11 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog { private TextField address_streetAddress = new TextField( "Street address"); @PropertyId("address.postalCode") - private TextField address_postalCode = new TextField( - "Postal code"); + private TextField address_postalCode = new TextField("Postal code"); @PropertyId("address.city") private TextField address_city = new TextField("City"); @PropertyId("address.country") - private TextField address_country = new TextField( - "Country"); + private TextField address_country = new TextField("Country"); public CustomForm() { fieldGroup.bindMemberFields(this); @@ -201,8 +199,7 @@ public abstract class AbstractBasicCrud extends AbstractTestUIWithLog { protected BeanFieldGroup<ComplexPerson> fieldGroup = new BeanFieldGroup<ComplexPerson>( ComplexPerson.class) { @Override - protected void configureField( - com.vaadin.v7.ui.Field<?> field) { + protected void configureField(com.vaadin.v7.ui.Field<?> field) { super.configureField(field); if (field.getCaption().equals("Postal code")) { // Last name editing is disabled through property. diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java index 4644c372cc..477e18c313 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRow.java @@ -52,8 +52,7 @@ public class BasicCrudGridEditorRow extends AbstractBasicCrud { grid.setEditorEnabled(true); grid.setSizeFull(); grid.getColumn("age").getEditorField().addValidator( - new IntegerRangeValidator("Must be between 0 and 100", 0, - 100)); + new IntegerRangeValidator("Must be between 0 and 100", 0, 100)); grid.getColumn("birthDate").setRenderer(new DateRenderer( DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.US))); addComponent(grid); diff --git a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java index 9225b552f1..d8637fe27f 100644 --- a/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java +++ b/uitest/src/main/java/com/vaadin/tests/fieldgroup/FormWithNestedProperties.java @@ -21,8 +21,7 @@ public class FormWithNestedProperties extends AbstractBeanFieldGroupTest { private TextField age = new TextField("Age"); @PropertyId("address.streetAddress") - private TextField streetAddress = new TextField( - "Street address"); + private TextField streetAddress = new TextField("Street address"); private NativeSelect country; private CheckBox deceased = new CheckBox("Deceased"); diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java index d40bd2da8c..5e187d1f79 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingInvisibleField.java @@ -15,10 +15,10 @@ public class MovingInvisibleField extends TestBase { final VerticalLayout layout1 = new VerticalLayout(); final VerticalLayout layout2 = new VerticalLayout(); - final TextField tfHidden = new TextField( - "Hidden text field caption", "A hidden text field"); - final TextField tfVisible = new TextField( - "Visible text field caption", "A visible text field"); + final TextField tfHidden = new TextField("Hidden text field caption", + "A hidden text field"); + final TextField tfVisible = new TextField("Visible text field caption", + "A visible text field"); tfHidden.setVisible(false); Button b = new Button("Move hidden textfield to other layout"); b.addListener(new ClickListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridIcon.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridIcon.java index 9708de292f..37dfbff847 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridIcon.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridIcon.java @@ -31,8 +31,7 @@ import com.vaadin.v7.ui.TextField; public class GridIcon extends GridBaseLayoutTestUI { @Override protected void setup(VaadinRequest request) { - layout.addComponent( - createLabelsFields(TextField.class, true, "")); + layout.addComponent(createLabelsFields(TextField.class, true, "")); layout.addComponent(createLabelsFields(Label.class, true, "")); layout.addComponent(createLabelsFields(Button.class, true, "")); layout.addComponent(createLabelsFields(ComboBox.class, true, "")); diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridLayoutRegError.java b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridLayoutRegError.java index 115c5458e2..a62ebe7a34 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridLayoutRegError.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/layouttester/GridLayout/GridLayoutRegError.java @@ -43,8 +43,7 @@ public class GridLayoutRegError extends GridBaseLayoutTestUI { layout.addComponent(createLabelsFields(Label.class, true, "")); layout.addComponent(createLabelsFields(Button.class, true, "")); layout.addComponent(createLabelsFields(TabSheet.class, true, "")); - layout.addComponent( - createLabelsFields(TextField.class, true, "")); + layout.addComponent(createLabelsFields(TextField.class, true, "")); layout.addComponent(createLabelsFields(ComboBox.class, true, "")); layout.addComponent(createLabelsFields(DateField.class, true, "")); diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java index d3321b3b88..ed1cccb4d3 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7_4/FormattingDataInGrid.java @@ -58,22 +58,20 @@ public class FormattingDataInGrid extends UI { NumberRenderer poundRenderer = new NumberRenderer(poundformat); grid.getColumn("amount").setRenderer(poundRenderer); - grid.getColumn("count") - .setConverter(new StringToIntegerConverter() { - @Override - public String convertToPresentation(Integer value, - Class<? extends String> targetType, Locale locale) - throws Converter.ConversionException { - String stringRepresentation = super.convertToPresentation( - value, targetType, locale); - if (value.intValue() % 2 == 0) { - return "<strong>" + stringRepresentation - + "</strong>"; - } else { - return "<em>" + stringRepresentation + "</em>"; - } - } - }); + grid.getColumn("count").setConverter(new StringToIntegerConverter() { + @Override + public String convertToPresentation(Integer value, + Class<? extends String> targetType, Locale locale) + throws Converter.ConversionException { + String stringRepresentation = super.convertToPresentation(value, + targetType, locale); + if (value.intValue() % 2 == 0) { + return "<strong>" + stringRepresentation + "</strong>"; + } else { + return "<em>" + stringRepresentation + "</em>"; + } + } + }); grid.getColumn("count").setRenderer(new HtmlRenderer()); } diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java index 818df35a1f..2e19fae73f 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/CreatingPreserveState.java @@ -39,8 +39,7 @@ public class CreatingPreserveState extends UI { @Override public void init(VaadinRequest request) { - TextField tf = new TextField( - "Instance #" + (++instanceCounter)); + TextField tf = new TextField("Instance #" + (++instanceCounter)); tf.setImmediate(true); content.addComponent(tf); diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormatTableValue.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormatTableValue.java index 4dd2f960cc..a66075e645 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormatTableValue.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7a1/FormatTableValue.java @@ -30,21 +30,19 @@ public class FormatTableValue extends AbstractTestUI { table.getItem(itemId).getItemProperty(DEFAULT_PROPERTY) .setValue(3.1415); - table.setConverter(PERCENT_PROPERTY, - new StringToDoubleConverter() { - @Override - protected NumberFormat getFormat(Locale locale) { - return NumberFormat.getPercentInstance(locale); - } - }); - - table.setConverter(CURRENCY_PROPERTY, - new StringToDoubleConverter() { - @Override - protected NumberFormat getFormat(Locale locale) { - return NumberFormat.getCurrencyInstance(locale); - } - }); + table.setConverter(PERCENT_PROPERTY, new StringToDoubleConverter() { + @Override + protected NumberFormat getFormat(Locale locale) { + return NumberFormat.getPercentInstance(locale); + } + }); + + table.setConverter(CURRENCY_PROPERTY, new StringToDoubleConverter() { + @Override + protected NumberFormat getFormat(Locale locale) { + return NumberFormat.getCurrencyInstance(locale); + } + }); addComponent(table); } diff --git a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java index 497977bf67..3332cdf4be 100644 --- a/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java +++ b/uitest/src/main/java/com/vaadin/tests/minitutorials/v7b9/LoginView.java @@ -24,8 +24,7 @@ public class LoginView extends Panel implements View { final TextField email = new TextField("Email"); layout.addComponent(email); - final PasswordField password = new PasswordField( - "Password"); + final PasswordField password = new PasswordField("Password"); layout.addComponent(password); final Button login = new Button("Login", new Button.ClickListener() { diff --git a/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java b/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java index 8cbb4c0007..e63cfd6d87 100644 --- a/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java +++ b/uitest/src/main/java/com/vaadin/tests/push/RoundTripTest.java @@ -31,16 +31,14 @@ public class RoundTripTest extends AbstractTestUI { @Override protected void setup(VaadinRequest request) { final RoundTripTester roundTripTester = new RoundTripTester(); - final TextField payloadSize = new TextField( - "Payload size (bytes)"); + final TextField payloadSize = new TextField("Payload size (bytes)"); payloadSize.setConverter(Integer.class); payloadSize.setConvertedValue(10000); if (request.getParameter("payload") != null) { payloadSize.setValue(request.getParameter("payload")); } addComponent(payloadSize); - final TextField testDuration = new TextField( - "Test duration (ms)"); + final TextField testDuration = new TextField("Test duration (ms)"); testDuration.setConverter(Integer.class); testDuration.setConvertedValue(10000); addComponent(testDuration); diff --git a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java index 99ddd75f3c..3fab24da91 100644 --- a/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java +++ b/uitest/src/main/java/com/vaadin/tests/tooltip/TooltipConfiguration.java @@ -98,8 +98,7 @@ public class TooltipConfiguration extends AbstractTestUIWithLog { } - private TextField createIntegerTextField(String caption, - int initialValue) { + private TextField createIntegerTextField(String caption, int initialValue) { TextField tf = new TextField(caption); tf.setId(caption); tf.setConverter(Integer.class); diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java index 9cea8a7d2d..10479a1779 100644 --- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java +++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java @@ -49,22 +49,20 @@ public class FieldErrorIndication extends AbstractTestUI { ComboBox comboBox = new ComboBox("ComboBox"); comboBox.addItem("ok"); comboBox.addItem("error"); - comboBox.addValidator( - new StringLengthValidator("fail", 0, 2, false)); + comboBox.addValidator(new StringLengthValidator("fail", 0, 2, false)); comboBox.setValue("error"); ListSelect listSelect = new ListSelect("ListSelect"); listSelect.addItem("ok"); listSelect.addItem("error"); - listSelect.addValidator( - new StringLengthValidator("fail", 0, 2, false)); + listSelect.addValidator(new StringLengthValidator("fail", 0, 2, false)); listSelect.setValue("error"); NativeSelect nativeSelect = new NativeSelect("NativeSelect"); nativeSelect.addItem("ok"); nativeSelect.addItem("error"); - nativeSelect.addValidator( - new StringLengthValidator("fail", 0, 2, false)); + nativeSelect + .addValidator(new StringLengthValidator("fail", 0, 2, false)); nativeSelect.setValue("error"); TwinColSelect twinColSelect = new TwinColSelect("TwinColSelect"); twinColSelect.addItem("ok"); diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java index 04df6c189c..9ebb0ba738 100644 --- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java +++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/grid/RowAwareRendererConnector.java @@ -33,7 +33,8 @@ import com.vaadin.v7.client.widget.grid.RendererCellReference; import elemental.json.JsonObject; @Connect(com.vaadin.tests.components.grid.RowAwareRenderer.class) -public class RowAwareRendererConnector extends AbstractGridRendererConnector<Void> { +public class RowAwareRendererConnector + extends AbstractGridRendererConnector<Void> { public interface RowAwareRendererRpc extends ServerRpc { void clicky(String key); } diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/passwordfield/PasswordFieldTest.java b/uitest/src/main/java/com/vaadin/v7/tests/components/passwordfield/PasswordFieldTest.java index e5985641cd..7561b8b371 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/passwordfield/PasswordFieldTest.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/passwordfield/PasswordFieldTest.java @@ -4,8 +4,7 @@ import com.vaadin.v7.event.FieldEvents.TextChangeListener; import com.vaadin.v7.tests.components.textfield.AbstractTextFieldTest; import com.vaadin.v7.ui.PasswordField; -public class PasswordFieldTest - extends AbstractTextFieldTest<PasswordField> +public class PasswordFieldTest extends AbstractTextFieldTest<PasswordField> implements TextChangeListener { @Override diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java index 6c4e1bbaf6..4cface820c 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/textfield/TextChangeEvents2.java @@ -122,9 +122,8 @@ public class TextChangeEvents2 extends TestBase { } { - final TextField[] tfs = new TextField[] { - new TextField(), new TextField(), - new TextField(), new TextField() }; + final TextField[] tfs = new TextField[] { new TextField(), + new TextField(), new TextField(), new TextField() }; HorizontalLayout hl = new HorizontalLayout(); hl.setCaption("Blää"); getLayout().addComponent(hl); @@ -163,8 +162,7 @@ public class TextChangeEvents2 extends TestBase { @Override public void valueChange(ValueChangeEvent event) { - TextField tf = (TextField) event - .getProperty(); + TextField tf = (TextField) event.getProperty(); String val = tf.getValue(); if (val != null && val.length() > 4) { tf.setValue(val.substring(0, 4)); diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java index 974e5ecdaa..0156f99e51 100644 --- a/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java +++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java @@ -122,10 +122,9 @@ public class ValoThemeUITest extends MultiBrowserTest { } private void selectTreeNodeByCaption(String string) { - WebElement e = $(TreeElement.class).first() - .findElement(By - .xpath("//div[@class='v-tree-node-caption']//span[text()='" - + string + "']")); + WebElement e = $(TreeElement.class).first().findElement( + By.xpath("//div[@class='v-tree-node-caption']//span[text()='" + + string + "']")); e.click(); } |