diff options
38 files changed, 134 insertions, 128 deletions
diff --git a/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java b/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java index 44a60b9fd5..3d8164b63f 100644 --- a/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java +++ b/client/src/main/java/com/vaadin/client/connectors/grid/GridDropTargetConnector.java @@ -302,10 +302,10 @@ public class GridDropTargetConnector extends DropTargetExtensionConnector { if (visibleRowRange.isEmpty() || getState().dropMode == DropMode.ON_TOP) { return tableWrapper; - } else { // if dragged under the last row to empty space, drop target - // needs to be below the last row - return gridBody.getRowElement(visibleRowRange.getEnd() - 1); } + // if dragged under the last row to empty space, drop target + // needs to be below the last row + return gridBody.getRowElement(visibleRowRange.getEnd() - 1); } @Override diff --git a/client/src/main/java/com/vaadin/client/ui/VGridLayout.java b/client/src/main/java/com/vaadin/client/ui/VGridLayout.java index 35caea48a2..b7adf70c2c 100644 --- a/client/src/main/java/com/vaadin/client/ui/VGridLayout.java +++ b/client/src/main/java/com/vaadin/client/ui/VGridLayout.java @@ -363,9 +363,10 @@ public class VGridLayout extends ComplexPanel { int y = paddingTop; for (int column = 0; column < cells.length; column++) { - y = paddingTop + 1 - 1; // Ensure IE10 does not optimize this out by - // adding something to evaluate on the RHS - // #11303 + // Ensure IE10 does not optimize this out by + // adding something to evaluate on the RHS + // #11303 + y = paddingTop + 1 - 1; for (int row = 0; row < cells[column].length; row++) { Cell cell = cells[column][row]; diff --git a/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java b/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java index 4159ef1078..fb1bba4182 100644 --- a/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java +++ b/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java @@ -308,8 +308,9 @@ public class WindowConnector extends AbstractSingleComponentContainerConnector || "video".equalsIgnoreCase(old.getTagName())) { if (!old.hasAttribute("controls") && "audio".equalsIgnoreCase(old.getTagName())) { - return null; // nothing to animate, so we won't add this to - // the clone + // nothing to animate, so we won't add this to + // the clone + return null; } Element newEl = DOM.createElement(old.getTagName()); if (old.hasAttribute("controls")) { diff --git a/client/src/main/java/com/vaadin/client/widgets/Grid.java b/client/src/main/java/com/vaadin/client/widgets/Grid.java index 34b58d569f..3dee1c0eba 100755 --- a/client/src/main/java/com/vaadin/client/widgets/Grid.java +++ b/client/src/main/java/com/vaadin/client/widgets/Grid.java @@ -4458,12 +4458,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, reordered.addAll(columns.subList( draggedColumnIndex + colspan, columns.size())); } - reordered.remove(selectionColumn); // since - // setColumnOrder - // will - // add - // it - // anyway! + // since setColumnOrder will add it anyway! + reordered.remove(selectionColumn); // capture focused cell column before reorder Cell focusedCell = cellFocusHandler.getFocusedCell(); @@ -4477,9 +4473,7 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, .toArray(new Column[reordered.size()]); setColumnOrder(true, array); transferCellFocusOnDrop(); - } // else - // no - // reordering + } // else no reordering } private void transferCellFocusOnDrop() { diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VForm.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VForm.java index 374a41ed42..b92e101d3c 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VForm.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VForm.java @@ -82,9 +82,10 @@ public class VForm extends ComplexPanel implements KeyDownHandler { fieldSet.appendChild(legend); legend.appendChild(caption); - fieldSet.appendChild(desc); // Adding description for initial padding - // measurements, removed later if no - // description is set + // Adding description for initial padding + // measurements, removed later if no + // description is set + fieldSet.appendChild(desc); fieldSet.appendChild(fieldContainer); errorMessage.setVisible(false); 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 3fdd286ef0..85e80fd928 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 @@ -325,9 +325,11 @@ public class VScrollTable extends FlowPanel private static final int CHARCODE_SPACE = 32; private int firstRowInViewPort = 0; private int pageLength = 15; - private int lastRequestedFirstvisible = 0; // to detect "serverside scroll" - private int firstvisibleOnLastPage = -1; // To detect if the first visible - // is on the last page + // to detect "serverside scroll" + private int lastRequestedFirstvisible = 0; + // To detect if the first visible + // is on the last page + private int firstvisibleOnLastPage = -1; /** For internal use only. May be removed or replaced in the future. */ public boolean showRowHeaders = false; @@ -3180,8 +3182,9 @@ public class VScrollTable extends FlowPanel colIndex = getColIndexByKey(cid); DOM.setCapture(getElement()); headerX = tHead.getAbsoluteLeft(); - event.preventDefault(); // prevent selecting text && - // generated touch events + // prevent selecting text && + // generated touch events + event.preventDefault(); } break; case Event.ONMOUSEUP: @@ -3237,10 +3240,12 @@ public class VScrollTable extends FlowPanel rowRequestHandler .setReqRows((int) (2 * pageLength * cacheRate + pageLength)); - rowRequestHandler.deferRowFetch(); // some validation + - // defer 250ms - rowRequestHandler.cancel(); // instead of waiting - rowRequestHandler.run(); // run immediately + // some validation and defer 250ms + // instead of waiting + rowRequestHandler.deferRowFetch(); + rowRequestHandler.cancel(); + // run immediately + rowRequestHandler.run(); } fireHeaderClickedEvent(event); if (WidgetUtil.isTouchEvent(event)) { @@ -7867,8 +7872,9 @@ public class VScrollTable extends FlowPanel VScrollTableRow toBeFocusedRow = scrollBody .getRowByRowIndex(indexOfToBeFocused); - if (toBeFocusedRow != null) { // if the next focused row - // is rendered + if (toBeFocusedRow != null) { + // if the next focused row is rendered + setRowFocus(toBeFocusedRow); selectFocusedRow(ctrl, shift); // TODO needs scrollintoview ? diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java index 69fcaa194c..ba3f51d8d9 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/schedule/DateCell.java @@ -573,9 +573,9 @@ public class DateCell extends FocusableComplexPanel implements MouseDownHandler, boolean display = true; if (event.isTimeOnDifferentDays()) { display = true; - } else { // only in case of one-day event we are able not to display - // event - // which is placed in unpublished parts on calendar + } else { + // only in case of one-day event we are able not to display + // event which is placed in unpublished parts on calendar Date eventStart = event.getStartTime(); Date eventEnd = event.getEndTime(); 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 a18cd15b28..cd69d19caf 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 @@ -4452,8 +4452,8 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, reordered.addAll(columns.subList( draggedColumnIndex + colspan, columns.size())); } - reordered.remove(selectionColumn); // since setColumnOrder will - // add it anyway! + // since setColumnOrder will add it anyway! + reordered.remove(selectionColumn); // capture focused cell column before reorder Cell focusedCell = cellFocusHandler.getFocusedCell(); @@ -4608,8 +4608,9 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, rightBound = cellColumnRightIndex; } cellColumnIndex = cellColumnRightIndex - 1; - } else { // can't drop inside a spanned cell, or this is the - // dragged cell + } else { + // can't drop inside a spanned cell, or this is the + // dragged cell while (colspan > 1) { cellColumnIndex++; colspan--; 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 a1ee67229d..bf8da1889a 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 @@ -787,8 +787,9 @@ public abstract class AbstractTextField extends AbstractField<String> implements protected Collection<String> getCustomAttributes() { Collection<String> customAttributes = super.getCustomAttributes(); customAttributes.add("maxlength"); - customAttributes.add("max-length"); // to prevent this appearing in - // output + + // prevent this from appearing in output + customAttributes.add("max-length"); customAttributes.add("cursor-position"); return customAttributes; } 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 05b6f950ca..103e998753 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 @@ -621,8 +621,8 @@ public class DateField extends AbstractField<Date> implements } } else if (newDate != oldDate && (newDate == null || !newDate.equals(oldDate))) { - setValue(newDate, true); // Don't require a repaint, client - // updates itself + // Don't require a repaint, client updates itself + setValue(newDate, true); } else if (!uiHasValidDateString) { // oldDate == // newDate == null // Empty value set, previously contained unparsable date string, 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 766c90197b..484e96d3f7 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 @@ -2811,8 +2811,8 @@ public class Table extends AbstractSelect implements Action.Container, final int length) { LinkedHashSet<Object> ids = new LinkedHashSet<Object>(); for (int i = 0; i < length; i++) { - assert itemId != null; // should not be null unless client-server - // are out of sync + // should not be null unless client-server are out of sync + assert itemId != null; ids.add(itemId); itemId = nextItemId(itemId); } diff --git a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java index 7a00fcc26c..6c347d8656 100644 --- a/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java +++ b/compatibility-server/src/main/java/com/vaadin/v7/ui/renderers/NumberRenderer.java @@ -115,8 +115,8 @@ public class NumberRenderer extends AbstractRenderer<Number> { */ public NumberRenderer(String formatString, Locale locale) throws IllegalArgumentException { - this(formatString, locale, ""); // This will call #toString() during - // formatting + // This will call #toString() during formatting + this(formatString, locale, ""); } /** diff --git a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridEditorMissingPropertyTest.java b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridEditorMissingPropertyTest.java index e35e807fe6..4bcda79e94 100644 --- a/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridEditorMissingPropertyTest.java +++ b/compatibility-server/src/test/java/com/vaadin/v7/tests/server/component/grid/GridEditorMissingPropertyTest.java @@ -79,8 +79,10 @@ public class GridEditorMissingPropertyTest { // Item with incomplete property set fieldGroup.setItemDataSource( grid.getContainerDataSource().getItem(folder)); - grid.getColumn(PROPERTY_NAME).getEditorField(); // called in - // grid.doEditItem + + // called in grid.doEditItem + grid.getColumn(PROPERTY_NAME).getEditorField(); + assertTrue("Properties in item should be bound", fieldGroup.getBoundPropertyIds().contains(PROPERTY_NAME)); assertFalse("Properties not present in item should not be bound", diff --git a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java index c0221af38e..0038d0ca11 100644 --- a/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java +++ b/server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java @@ -256,8 +256,8 @@ public class FileUploadHandler implements RequestHandler { .indexOf(ServletPortletHelper.UPLOAD_URL_PREFIX) + ServletPortletHelper.UPLOAD_URL_PREFIX.length(); String uppUri = pathInfo.substring(startOfData); - String[] parts = uppUri.split("/", 4); // 0= UIid, 1 = cid, 2= name, 3 - // = sec key + // 0= UIid, 1= cid, 2= name, 3= sec key + String[] parts = uppUri.split("/", 4); String uiId = parts[0]; String connectorId = parts[1]; String variableName = parts[2]; diff --git a/server/src/main/java/com/vaadin/ui/AbstractDateField.java b/server/src/main/java/com/vaadin/ui/AbstractDateField.java index a201fcff85..3247bbf1e6 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractDateField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractDateField.java @@ -695,9 +695,8 @@ public abstract class AbstractDateField<T extends Temporal & TemporalAdjuster & value = getEmptyValue(); } dateString = formatDate(value); - RangeValidator<T> validator = getRangeValidator();// TODO move range - // check to internal - // validator? + // TODO move range check to internal validator? + RangeValidator<T> validator = getRangeValidator(); ValidationResult result = validator.apply(value, new ValueContext(this, this)); diff --git a/server/src/main/java/com/vaadin/ui/AbstractTextField.java b/server/src/main/java/com/vaadin/ui/AbstractTextField.java index feb538655f..aca2f254e4 100644 --- a/server/src/main/java/com/vaadin/ui/AbstractTextField.java +++ b/server/src/main/java/com/vaadin/ui/AbstractTextField.java @@ -19,10 +19,10 @@ package com.vaadin.ui; import java.util.Collection; import java.util.Objects; -import com.vaadin.event.FieldEvents; import org.jsoup.nodes.Attributes; import org.jsoup.nodes.Element; +import com.vaadin.event.FieldEvents; import com.vaadin.event.FieldEvents.BlurEvent; import com.vaadin.event.FieldEvents.BlurListener; import com.vaadin.event.FieldEvents.FocusEvent; @@ -286,8 +286,8 @@ public abstract class AbstractTextField extends AbstractField<String> protected Collection<String> getCustomAttributes() { Collection<String> customAttributes = super.getCustomAttributes(); customAttributes.add("maxlength"); - customAttributes.add("max-length"); // to prevent this appearing in - // output + // to prevent this appearing in output + customAttributes.add("max-length"); customAttributes.add("cursor-position"); return customAttributes; } diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java index 46eecde33f..761567d3c8 100644 --- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java +++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java @@ -116,9 +116,7 @@ public class DesignResourceConverter implements Converter<String, Resource> { return CODE_POINTS.get(codepoint); } - if (FontAwesome.FONT_FAMILY.equals(familyAndCode[0])) { // Left - // for - // compatibility + if (FontAwesome.FONT_FAMILY.equals(familyAndCode[0])) { // Left for compatibility return FontAwesome.fromCodepoint(codepoint); } // all vaadin icons should have a codepoint diff --git a/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java b/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java index 8e00c44ebd..6fa259664c 100644 --- a/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java +++ b/server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java @@ -114,8 +114,8 @@ public class NumberRenderer extends AbstractRenderer<Object, Number> { */ public NumberRenderer(String formatString, Locale locale) throws IllegalArgumentException { - this(formatString, locale, ""); // This will call #toString() during - // formatting + // This will call #toString() during formatting + this(formatString, locale, ""); } /** diff --git a/server/src/test/java/com/vaadin/data/GridAsSingleSelectInBinderTest.java b/server/src/test/java/com/vaadin/data/GridAsSingleSelectInBinderTest.java index e38b86f6db..15b5bff007 100644 --- a/server/src/test/java/com/vaadin/data/GridAsSingleSelectInBinderTest.java +++ b/server/src/test/java/com/vaadin/data/GridAsSingleSelectInBinderTest.java @@ -143,12 +143,12 @@ public class GridAsSingleSelectInBinderTest }); grid.getSelectionModel().select(Sex.UNKNOWN); - model.setSelectedFromClient(Sex.MALE); // simulates client side - // selection + // simulates client side selection + model.setSelectedFromClient(Sex.MALE); grid.getSelectionModel().select(Sex.MALE); // NOOP grid.getSelectionModel().deselect(Sex.UNKNOWN); // NOOP - model.setSelectedFromClient(null); // simulates deselect from client - // side + // simulates deselect from client side + model.setSelectedFromClient(null); grid.getSelectionModel().select(Sex.FEMALE); assertEquals(Arrays.asList(Sex.UNKNOWN, Sex.MALE, null, Sex.FEMALE), diff --git a/server/src/test/java/com/vaadin/server/VaadinSessionTest.java b/server/src/test/java/com/vaadin/server/VaadinSessionTest.java index ccd610269c..c4d1275bf4 100644 --- a/server/src/test/java/com/vaadin/server/VaadinSessionTest.java +++ b/server/src/test/java/com/vaadin/server/VaadinSessionTest.java @@ -210,12 +210,10 @@ public class VaadinSessionTest implements Serializable { session.valueUnbound( EasyMock.createMock(HttpSessionBindingEvent.class)); - mockService.runPendingAccessTasks(session); // as soon as we changed - // session.accessSynchronously - // to session.access in - // VaadinService.fireSessionDestroy, - // we need to run the - // pending task ourselves + // as soon as we changed session.accessSynchronously + // to session.access in VaadinService.fireSessionDestroy, + // we need to run the pending task ourselves + mockService.runPendingAccessTasks(session); assertTrue(detachCalled.get()); } @@ -233,12 +231,10 @@ public class VaadinSessionTest implements Serializable { CurrentInstance.clearAll(); session.close(); mockService.cleanupSession(session); - mockService.runPendingAccessTasks(session); // as soon as we changed - // session.accessSynchronously - // to session.access in - // VaadinService.fireSessionDestroy, - // we need to run the - // pending task ourselves + // as soon as we changed session.accessSynchronously + // to session.access in VaadinService.fireSessionDestroy, + // we need to run the pending task ourselves + mockService.runPendingAccessTasks(session); assertTrue(detachCalled.get()); } diff --git a/server/src/test/java/com/vaadin/tests/components/grid/GridSingleSelectionModelTest.java b/server/src/test/java/com/vaadin/tests/components/grid/GridSingleSelectionModelTest.java index 4fb8b25199..6481c84999 100644 --- a/server/src/test/java/com/vaadin/tests/components/grid/GridSingleSelectionModelTest.java +++ b/server/src/test/java/com/vaadin/tests/components/grid/GridSingleSelectionModelTest.java @@ -155,11 +155,9 @@ public class GridSingleSelectionModelTest { // since the selection model has been removed, it is no longer a data // generator for the data communicator, would need to verify somehow // that row is not marked as selected anymore ? (done in UI tests) - assertTrue(customModel.generatedData.isEmpty()); // at least - // removed - // selection - // model is not - // triggered + + // at least removed selection model is not triggered + assertTrue(customModel.generatedData.isEmpty()); } @Test diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/DataObject.java b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/DataObject.java index 54dc8d74b2..800a808485 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/grid/basics/DataObject.java +++ b/uitest/src/main/java/com/vaadin/tests/components/grid/basics/DataObject.java @@ -86,8 +86,8 @@ public class DataObject { obj.setSmallRandom(rand.nextInt(5)); obj.setDate(new Date(timestamp)); - timestamp += 91250000; // a bit over a day, just to get - // variation + // a bit over a day, just to get variation + timestamp += 91250000; data.add(obj); } diff --git a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java index 2599ed55ff..452161d336 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java +++ b/uitest/src/main/java/com/vaadin/tests/components/orderedlayout/VaadinTunesLayout.java @@ -298,9 +298,8 @@ public class VaadinTunesLayout extends AbstractReindeerTestUI { top.setHeight("75px"); // Same as the background image height playback.setStyleName("playback"); - playback.setMargin(new MarginInfo(false, true, false, false)); // Add - // right-side - // margin + // Add right-side margin + playback.setMargin(new MarginInfo(false, true, false, false)); play.setStyleName("play"); next.setStyleName("next"); prev.setStyleName("prev"); diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java index 02789e9319..23122f90c3 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java +++ b/uitest/src/main/java/com/vaadin/tests/components/table/AddItemToEmptyTable.java @@ -44,8 +44,8 @@ public class AddItemToEmptyTable extends TestBase { rightTable.setSelectable(true); rightTable.setMultiSelect(true); - rightTable.setImmediate(true); // react at once when something is - // selected + // react at once when something is selected + rightTable.setImmediate(true); rightTable.addContainerProperty("name", String.class, null); // rightTable.setColumnWidth("name", 150); diff --git a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java index 4cc77c862d..d96e5b9b56 100644 --- a/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java +++ b/uitest/src/main/java/com/vaadin/tests/components/textarea/TextAreaSizeResetted.java @@ -60,8 +60,9 @@ public class TextAreaSizeResetted extends AbstractReindeerTestUI { @Override protected void setup(VaadinRequest request) { - setPollInterval(500); // Short polling like 100ms jams up the TestBench - // waitForVaadin -functionality. + // Short polling like 100ms jams up the TestBench + // waitForVaadin -functionality. + setPollInterval(500); final Label pollIndicator = new Label(); pollIndicator.setId("pollIndicator"); diff --git a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java index 8d07ac9bae..f641befb3c 100644 --- a/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java +++ b/uitest/src/main/java/com/vaadin/tests/layouts/MovingComponentsWhileOldParentInvisible.java @@ -27,8 +27,9 @@ import com.vaadin.ui.VerticalSplitPanel; public class MovingComponentsWhileOldParentInvisible extends TestBase { - private HasComponents cc = new AbsoluteLayout(); // initial dummy - // contents + // initial dummy contents + private HasComponents cc = new AbsoluteLayout(); + private Label lab; @Override diff --git a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java index 0fb967610c..fb9d58bd17 100644 --- a/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java +++ b/uitest/src/main/java/com/vaadin/tests/widgetset/client/v7/grid/GridBasicClientFeaturesWidget.java @@ -237,8 +237,8 @@ public class GridBasicClientFeaturesWidget d = datarow.get(col++); d.value = new Date(timestamp); - timestamp += 91250000; // a bit over a day, just to get - // variation + // a bit over a day, just to get variation + timestamp += 91250000; d = datarow.get(col++); d.value = "<b>" + row + "</b>"; diff --git a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java index 853b40fe69..700a79d14a 100644 --- a/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java +++ b/uitest/src/main/java/com/vaadin/v7/tests/components/grid/basicfeatures/GridBasicFeatures.java @@ -304,8 +304,8 @@ public class GridBasicFeatures extends AbstractComponentTest<Grid> { .setValue(Integer.valueOf(row)); item.getItemProperty(getColumnProperty(col++)) .setValue(new Date(timestamp)); - timestamp += 91250000; // a bit over a day, just to get - // variation + // a bit over a day, just to get variation + timestamp += 91250000; item.getItemProperty(getColumnProperty(col++)) .setValue("<b>" + row + "</b>"); diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java index 2e40d16abe..c79120afd2 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxScrollingWithArrowsTest.java @@ -90,8 +90,8 @@ public class ComboBoxScrollingWithArrowsTest extends MultiBrowserTest { waitUntilNextPageIsVisible(); dropDownComboBox.sendKeys(Keys.UP); - assertThat(getSelectedItemText(), is("item " + (PAGESIZE - 1))); // item - // 9 + // item 9 + assertThat(getSelectedItemText(), is("item " + (PAGESIZE - 1))); } private void waitUntilNextPageIsVisible() { diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldChangeResolutionTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldChangeResolutionTest.java index cd0b6212c7..ac0f14be8b 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldChangeResolutionTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DateTimeFieldChangeResolutionTest.java @@ -55,8 +55,8 @@ public class DateTimeFieldChangeResolutionTest extends MultiBrowserTest { @Test public void changeResolutionToDayThenMonth() throws Exception { initialize(); - checkHeaderAndBody(DateTimeResolution.YEAR, true); // check the initial - // state + // check the initial state + checkHeaderAndBody(DateTimeResolution.YEAR, true); click(resolutionDay); checkHeaderAndBody(DateTimeResolution.DAY, true); click(resolutionMonth); diff --git a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java index 47c62b57c4..af1ac8508e 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/datefield/DisabledParentLayoutTest.java @@ -67,8 +67,9 @@ public class DisabledParentLayoutTest extends MultiBrowserTest { textField.getAttribute("value")); dataFieldButton.click(); - dataFieldButton.click();// Requires two clicks because of error message. - // TODO fix + // Requires two clicks because of error message. + // TODO fix + dataFieldButton.click(); assertFalse("Unexpected disabled element found", isElementPresent(By.className("v-disabled"))); diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java index c5a5b8834e..435d1f7370 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridResizeHiddenColumnTest.java @@ -74,8 +74,8 @@ public class GridResizeHiddenColumnTest extends MultiBrowserTest { By.className("v-grid-sidebar-popup")); WebElement visibilityToggle = findElementByText("Last Name", sidebarPopup.findElements(By.className("gwt-MenuItem"))); - action.click(visibilityToggle).perform(); // Click on "Last Name" - // menu item + // Click on "Last Name" menu item + action.click(visibilityToggle).perform(); // Check if column "Last Name" is visible headerCells = grid.getHeaderCells(0); diff --git a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllTest.java b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllTest.java index 1900ea2447..3f4e72e7d9 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/grid/GridSelectAllTest.java @@ -135,8 +135,9 @@ public class GridSelectAllTest extends GridBasicsTest { getGridElement().getCell(5, 0).click(); - verifyAllSelected(false); // EXPECTED since multiselection model can't - // verify that all have been selected + // EXPECTED since multiselection model can't + // verify that all have been selected + verifyAllSelected(false); } @Test @@ -155,8 +156,9 @@ public class GridSelectAllTest extends GridBasicsTest { toggleFirstRowSelection(); - verifyAllSelected(false); // EXPECTED since multiselection model can't - // verify that all have been selected + // EXPECTED since multiselection model can't + // verify that all have been selected + verifyAllSelected(false); } @Test @@ -171,8 +173,9 @@ public class GridSelectAllTest extends GridBasicsTest { getGridElement().getCell(5, 0).click(); - verifyAllSelected(false); // EXPECTED since multiselection model can't - // verify that all have been selected + // EXPECTED since multiselection model can't + // verify that all have been selected + verifyAllSelected(false); } @Test @@ -187,8 +190,9 @@ public class GridSelectAllTest extends GridBasicsTest { toggleFirstRowSelection(); - verifyAllSelected(false); // EXPECTED since multiselection model can't - // verify that all have been selected + // EXPECTED since multiselection model can't + // verify that all have been selected + verifyAllSelected(false); } @Test diff --git a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java index a4f91e516f..68134f46ec 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/gridlayout/ComponentAlignmentsTest.java @@ -49,8 +49,8 @@ public class ComponentAlignmentsTest extends MultiBrowserTest { rightSpaceSize > 0); int diff = Math.abs(rightSpaceSize - leftSpaceSize); - assertTrue("Element is not in the center, diff:" + diff, diff <= 2); // IE11 - // 2pixels + // IE11 2pixels + assertTrue("Element is not in the center, diff:" + diff, diff <= 2); } @Test diff --git a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectTest.java b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectTest.java index af6abf5a24..9172e079e7 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/listselect/ListSelectTest.java @@ -58,14 +58,14 @@ public class ListSelectTest extends SingleBrowserTestPhantomJS2 { addItemsToSelection("Item 4"); assertEquals("4. Selected: [Item 2, Item 4]", getLogRow(0)); - addItemsToSelection("Item 10", "Item 0", "Item 9"); // will cause 3 - // events + // will cause 3 events + addItemsToSelection("Item 10", "Item 0", "Item 9"); assertEquals("7. Selected: [Item 2, Item 4, Item 10, Item 0, Item 9]", getLogRow(0)); - removeItemsFromSelection("Item 0", "Item 2", "Item 9"); // will cause 3 - // events + // will cause 3 events + removeItemsFromSelection("Item 0", "Item 2", "Item 9"); assertEquals("10. Selected: [Item 4, Item 10]", getLogRow(0)); } diff --git a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java index adaf019719..488342264f 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/table/TableToggleColumnVisibilityTest.java @@ -55,10 +55,9 @@ public class TableToggleColumnVisibilityTest extends MultiBrowserTest { findElements(By.className("v-table-header-cell")).size(), 2); checkHeaderAttributes(1); - changeOrderButton.click(); // change column order, column #1 now becomes - // column #0 + // change column order, column #1 now becomes column #0 + changeOrderButton.click(); checkHeaderAttributes(0); - } /* diff --git a/uitest/src/test/java/com/vaadin/tests/components/ui/UriFragmentTest.java b/uitest/src/test/java/com/vaadin/tests/components/ui/UriFragmentTest.java index 1556355149..4b5c664350 100644 --- a/uitest/src/test/java/com/vaadin/tests/components/ui/UriFragmentTest.java +++ b/uitest/src/test/java/com/vaadin/tests/components/ui/UriFragmentTest.java @@ -38,8 +38,9 @@ public class UriFragmentTest extends MultiBrowserTest { assertEquals("Current URI fragment:", getFragmentLabelValue()); navigateToTest(); assertFragment("test"); - navigateToNull(); // Setting to null when there is a fragment actually - // sets it to # + // Setting to null when there is a fragment actually + // sets it to # + navigateToNull(); assertEquals("Current URI fragment:", getFragmentLabelValue()); // ensure IE works with new popstate based implementation, see diff --git a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridSpacerDecoClipTest.java b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridSpacerDecoClipTest.java index f2ad86a4e7..c2f81295bc 100644 --- a/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridSpacerDecoClipTest.java +++ b/uitest/src/test/java/com/vaadin/v7/tests/components/grid/GridSpacerDecoClipTest.java @@ -77,11 +77,13 @@ public class GridSpacerDecoClipTest extends MultiBrowserTest { GridElement.GridRowElement nearToBottomRow = gridElement.getRow(993); - nearToBottomRow.doubleClick(); // Open upper Row Details, lower Row - // Details goes out of visible range + // Open upper Row Details, lower Row + // Details goes out of visible range + nearToBottomRow.doubleClick(); Thread.sleep(500); - nearToBottomRow.doubleClick(); // Close upper Row Details, lower Row - // Details goes back to visible range + // Close upper Row Details, lower Row + // Details goes back to visible range + nearToBottomRow.doubleClick(); deco = getSpacerDeco(0); String clip = deco.getCssValue("clip"); |