summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSun Zhe <31067185+ZheSun88@users.noreply.github.com>2019-05-02 15:13:17 +0300
committerGitHub <noreply@github.com>2019-05-02 15:13:17 +0300
commit13f1c168d2bffcb66410276dda039d4cf79d5f9c (patch)
treeb5e02ff60d3f1033d00abcdccbb3f49dd0e55825
parent5fa144193c0d5ed2022e576431a20beead2bfeb8 (diff)
downloadvaadin-framework-13f1c168d2bffcb66410276dda039d4cf79d5f9c.tar.gz
vaadin-framework-13f1c168d2bffcb66410276dda039d4cf79d5f9c.zip
code format (#11555)
-rw-r--r--client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java15
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VComboBox.java7
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VMenuBar.java9
-rw-r--r--client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java4
-rw-r--r--server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/ComboBox.java5
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java3
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxAddNewItemAndResetProviderAtSameRoundTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java1
-rw-r--r--uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java4
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/GridDisabledTest.java6
-rw-r--r--uitest/src/test/java/com/vaadin/tests/themes/valo/ValoThemeUITest.java8
12 files changed, 37 insertions, 31 deletions
diff --git a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
index 2992d39d1f..987331a685 100644
--- a/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
+++ b/client/src/main/java/com/vaadin/client/data/AbstractRemoteDataSource.java
@@ -746,9 +746,9 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
if (trackInvalidatedRows) {
/*
- * We need to invalidate the cache from the inserted row onwards,
- * since the cache wants to be a contiguous range. It doesn't
- * support holes.
+ * We need to invalidate the cache from the inserted row
+ * onwards, since the cache wants to be a contiguous range. It
+ * doesn't support holes.
*
* If holes were supported, we could shift the higher part of
* "cached" and leave a hole the size of "count" in the middle.
@@ -769,11 +769,12 @@ public abstract class AbstractRemoteDataSource<T> implements DataSource<T> {
Profiler.leave("AbstractRemoteDataSource.insertRowData");
}
- private void trackInvalidatedRowsFromCache(Range invalidated, int insertedRowCount){
+ private void trackInvalidatedRowsFromCache(Range invalidated,
+ int insertedRowCount) {
/*
- * If we already have a map in invalidatedRows, we're in a state
- * where multiple row manipulations without data received have
- * happened and the cache restoration is prevented completely.
+ * If we already have a map in invalidatedRows, we're in a state where
+ * multiple row manipulations without data received have happened and
+ * the cache restoration is prevented completely.
*/
if (!invalidated.isEmpty() && invalidatedRows == null) {
diff --git a/client/src/main/java/com/vaadin/client/ui/VComboBox.java b/client/src/main/java/com/vaadin/client/ui/VComboBox.java
index 50d4c6588c..587710e612 100644
--- a/client/src/main/java/com/vaadin/client/ui/VComboBox.java
+++ b/client/src/main/java/com/vaadin/client/ui/VComboBox.java
@@ -121,7 +121,7 @@ public class VComboBox extends Composite implements Field, KeyDownHandler,
* icon URI or null
*/
public ComboBoxSuggestion(String key, String caption, String style,
- String untranslatedIconUri) {
+ String untranslatedIconUri) {
this.key = key;
this.caption = caption;
this.style = style;
@@ -1372,8 +1372,9 @@ public class VComboBox extends Composite implements Field, KeyDownHandler,
* allowed.
*/
if (BrowserInfo.get().isChrome()) {
- // Chrome supports "off" and random number does not work with Chrome
- getElement().setAttribute("autocomplete", "off");
+ // Chrome supports "off" and random number does not work with
+ // Chrome
+ getElement().setAttribute("autocomplete", "off");
} else {
getElement().setAttribute("autocomplete", Math.random() + "");
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
index 584e476850..d20f0e6aef 100644
--- a/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
+++ b/client/src/main/java/com/vaadin/client/ui/VMenuBar.java
@@ -133,11 +133,12 @@ public class VMenuBar extends FocusableFlowPanel implements
addFocusHandler(this);
/*
- * Firefox prior to v65 auto-repeat works correctly only if we use a key press
- * handler, other browsers handle it correctly when using a key down
- * handler
+ * Firefox prior to v65 auto-repeat works correctly only if we use a key
+ * press handler, other browsers handle it correctly when using a key
+ * down handler
*/
- if (BrowserInfo.get().isGecko() && BrowserInfo.get().getGeckoVersion() < 65) {
+ if (BrowserInfo.get().isGecko()
+ && BrowserInfo.get().getGeckoVersion() < 65) {
addKeyPressHandler(this);
} else {
addKeyDownHandler(this);
diff --git a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
index 44d60121b1..70ede2fa99 100644
--- a/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/panel/PanelConnector.java
@@ -97,9 +97,9 @@ public class PanelConnector extends AbstractSingleComponentContainerConnector
panel.captionNode.setClassName(VPanel.CLASSNAME + "-caption");
boolean hasCaption = hasCaption();
if (hasCaption) {
- panel.setCaption(getState().caption,getState().captionAsHtml);
+ panel.setCaption(getState().caption, getState().captionAsHtml);
} else {
- panel.setCaption("",false);
+ panel.setCaption("", false);
panel.captionNode.setClassName(VPanel.CLASSNAME + "-nocaption");
}
diff --git a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
index 39f0b3df97..0aec4bb6e1 100644
--- a/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
+++ b/server/src/main/java/com/vaadin/server/communication/JSR356WebsocketInitializer.java
@@ -261,5 +261,5 @@ public class JSR356WebsocketInitializer implements ServletContextListener {
*/
public static boolean isAtmosphereAvailable() {
return atmosphereAvailable;
- }
+ }
}
diff --git a/server/src/main/java/com/vaadin/ui/ComboBox.java b/server/src/main/java/com/vaadin/ui/ComboBox.java
index b4d9a97c78..c9622e1fd8 100644
--- a/server/src/main/java/com/vaadin/ui/ComboBox.java
+++ b/server/src/main/java/com/vaadin/ui/ComboBox.java
@@ -191,7 +191,8 @@ public class ComboBox<T> extends AbstractSingleSelect<T>
if (getNewItemProvider() != null) {
Optional<T> item = getNewItemProvider().apply(itemValue);
added = item.isPresent();
- // Fixes issue https://github.com/vaadin/framework/issues/11343
+ // Fixes issue
+ // https://github.com/vaadin/framework/issues/11343
// Update the internal selection state immediately to avoid
// client side hanging. This is needed for cases that user
// interaction fires multi events (like adding and deleting)
@@ -455,7 +456,7 @@ public class ComboBox<T> extends AbstractSingleSelect<T>
* @since 8.0
*/
public void setDataProvider(CaptionFilter captionFilter,
- ListDataProvider<T> listDataProvider) {
+ ListDataProvider<T> listDataProvider) {
Objects.requireNonNull(listDataProvider,
"List data provider cannot be null");
diff --git a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
index 8c1abd37fd..70f37e1f70 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIcons.java
@@ -24,7 +24,8 @@ public class ComboBoxVaadinIcons extends AbstractTestUI {
Label valueLabel = new Label();
valueLabel.setValue("Test");
valueLabel.setId("value-label");
- comboBox.addValueChangeListener(event -> valueLabel.setValue(comboBox.getValue()));
+ comboBox.addValueChangeListener(
+ event -> valueLabel.setValue(comboBox.getValue()));
addComponent(comboBox);
addComponent(valueLabel);
}
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxAddNewItemAndResetProviderAtSameRoundTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxAddNewItemAndResetProviderAtSameRoundTest.java
index a1a7a1f685..d00fe4c51d 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxAddNewItemAndResetProviderAtSameRoundTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxAddNewItemAndResetProviderAtSameRoundTest.java
@@ -108,8 +108,8 @@ public class ComboBoxAddNewItemAndResetProviderAtSameRoundTest
private void assertLogMessage() {
sleep(2000);
- //current test is not stable for collecting all the logs,
- //so that we need to do the assertion with full log and contents.
+ // current test is not stable for collecting all the logs,
+ // so that we need to do the assertion with full log and contents.
assertTrue("The full log should contain the following text",
getLogs().toString().contains("ComboBox value : 000"));
assertTrue("The full log should contain the following text",
diff --git a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java
index 7fe2e81543..97a9455d63 100644
--- a/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/components/combobox/ComboBoxVaadinIconsTest.java
@@ -25,6 +25,5 @@ public class ComboBoxVaadinIconsTest extends MultiBrowserTest {
Assert.assertEquals(findElement(By.id("value-label")).getText(),
"PAPERPLANE");
-
}
}
diff --git a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
index 4401abc3fa..103aa469f5 100644
--- a/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/fieldgroup/BasicCrudGridEditorRowTest.java
@@ -36,7 +36,7 @@ public class BasicCrudGridEditorRowTest extends MultiBrowserTest {
public void lookAndFeel() throws Exception {
GridCellElement ritaBirthdate = grid.getCell(2, 3);
waitUntilLoadingIndicatorNotVisible();
- assertEquals("May 16, 1992",ritaBirthdate.getText());
+ assertEquals("May 16, 1992", ritaBirthdate.getText());
// Grid Editor should not present yet
waitForElementNotPresent(By.className("v-grid-editor"));
@@ -84,7 +84,7 @@ public class BasicCrudGridEditorRowTest extends MultiBrowserTest {
assertNotEquals("Checkbox value did not change", value, cb.getValue());
}
- @Test
+ @Test
public void testNoTopStyleSetOnEditorOpenWithFooterOnTop() {
GridCellElement cell = grid.getCell(2, 3);
// Open editor row
diff --git a/uitest/src/test/java/com/vaadin/tests/themes/valo/GridDisabledTest.java b/uitest/src/test/java/com/vaadin/tests/themes/valo/GridDisabledTest.java
index 1cf847fee6..032a6c5572 100644
--- a/uitest/src/test/java/com/vaadin/tests/themes/valo/GridDisabledTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/themes/valo/GridDisabledTest.java
@@ -19,9 +19,11 @@ public class GridDisabledTest extends MultiBrowserTest {
waitUntilLoadingIndicatorNotVisible();
GridElement disabledGrid = $(GridElement.class).id("disabled-grid");
- assertFalse(disabledGrid.getClassNames().toString().contains("v-disabled"));
+ assertFalse(
+ disabledGrid.getClassNames().toString().contains("v-disabled"));
$(ButtonElement.class).caption("Disable").first().click();
- assertTrue(disabledGrid.getClassNames().toString().contains("v-disabled"));
+ assertTrue(
+ disabledGrid.getClassNames().toString().contains("v-disabled"));
}
}
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 de11c22d82..c0350bbc15 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
@@ -217,13 +217,13 @@ public class ValoThemeUITest extends MultiBrowserTest {
public void accordions() throws Exception {
open("Accordions");
- // Screenshot test is very unstable here.
- // We are testing the label contains the correct text in this case.
+ // Screenshot test is very unstable here.
+ // We are testing the label contains the correct text in this case.
CssLayoutElement content = wrap(CssLayoutElement.class,
findElement(By.className("valo-content")));
LabelElement labelElem = content.$(LabelElement.class).get(1);
- String text = "Fabio vel iudice vincam, sunt in culpa qui officia. Ut " +
- "enim ad minim veniam, quis nostrud exercitation.";
+ String text = "Fabio vel iudice vincam, sunt in culpa qui officia. Ut "
+ + "enim ad minim veniam, quis nostrud exercitation.";
Assert.assertEquals(text, labelElem.getText());
}