@@ -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) { |
@@ -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() + ""); | |||
} |
@@ -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); |
@@ -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"); | |||
} | |||
@@ -261,5 +261,5 @@ public class JSR356WebsocketInitializer implements ServletContextListener { | |||
*/ | |||
public static boolean isAtmosphereAvailable() { | |||
return atmosphereAvailable; | |||
} | |||
} | |||
} |
@@ -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"); | |||
@@ -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); | |||
} |
@@ -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", |
@@ -25,6 +25,5 @@ public class ComboBoxVaadinIconsTest extends MultiBrowserTest { | |||
Assert.assertEquals(findElement(By.id("value-label")).getText(), | |||
"PAPERPLANE"); | |||
} | |||
} |
@@ -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 |
@@ -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")); | |||
} | |||
} |
@@ -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()); | |||
} | |||