aboutsummaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-31 17:41:14 +0100
committerPekka Maanpää <pekkamaa@vaadin.com>2017-10-31 18:41:14 +0200
commitd44a5e217d1fc2852adb84cc6ce1c0146ac603f2 (patch)
tree8a497e1b77f4f2f29bc218dc802f11bd3e370d69 /server/src
parent3564d4b4ba7c9ff718879d7544aa2e309489c531 (diff)
downloadvaadin-framework-d44a5e217d1fc2852adb84cc6ce1c0146ac603f2.tar.gz
vaadin-framework-d44a5e217d1fc2852adb84cc6ce1c0146ac603f2.zip
Fix end of line comments, which were made by automatic formatter (#10234)
Diffstat (limited to 'server/src')
-rw-r--r--server/src/main/java/com/vaadin/server/communication/FileUploadHandler.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractDateField.java5
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractTextField.java6
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignResourceConverter.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/renderers/NumberRenderer.java4
-rw-r--r--server/src/test/java/com/vaadin/data/GridAsSingleSelectInBinderTest.java8
-rw-r--r--server/src/test/java/com/vaadin/server/VaadinSessionTest.java20
-rw-r--r--server/src/test/java/com/vaadin/tests/components/grid/GridSingleSelectionModelTest.java8
8 files changed, 25 insertions, 34 deletions
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