summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java8
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VEmbedded.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/VFlash.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java8
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VScrollTable.java2
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java6
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java2
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java2
-rw-r--r--server/src/main/java/com/vaadin/navigator/Navigator.java2
-rw-r--r--server/src/main/java/com/vaadin/server/ComponentSizeValidator.java31
-rw-r--r--server/src/main/java/com/vaadin/server/JsonPaintTarget.java28
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServlet.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/AbsoluteLayout.java10
-rw-r--r--server/src/main/java/com/vaadin/ui/GridLayout.java8
-rw-r--r--server/src/main/java/com/vaadin/ui/UI.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java23
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/Design.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java4
-rw-r--r--server/src/main/java/com/vaadin/util/ConnectorHelper.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java10
-rw-r--r--server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java4
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestForUpload.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java6
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java2
-rw-r--r--uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java6
33 files changed, 109 insertions, 107 deletions
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 f18ecb0711..17b37da617 100644
--- a/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
+++ b/client/src/main/java/com/vaadin/client/extensions/ResponsiveConnector.java
@@ -104,17 +104,17 @@ public class ResponsiveConnector extends AbstractExtensionConnector
protected String constructSelectorsForTarget() {
String primaryStyle = target.getState().primaryStyleName;
StringBuilder selectors = new StringBuilder();
- selectors.append(".").append(primaryStyle);
+ selectors.append('.').append(primaryStyle);
if (target.getState().styles != null
&& target.getState().styles.size() > 0) {
for (String style : target.getState().styles) {
selectors.append(",.").append(style);
- selectors.append(",.").append(primaryStyle).append(".")
+ selectors.append(",.").append(primaryStyle).append('.')
.append(style);
- selectors.append(",.").append(style).append(".")
+ selectors.append(",.").append(style).append('.')
.append(primaryStyle);
- selectors.append(",.").append(primaryStyle).append("-")
+ selectors.append(",.").append(primaryStyle).append('-')
.append(style);
}
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VEmbedded.java b/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
index 5f4e801a44..54f3fdcf4e 100644
--- a/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
+++ b/client/src/main/java/com/vaadin/client/ui/VEmbedded.java
@@ -138,7 +138,7 @@ public class VEmbedded extends HTML {
}
// End object tag
- html.append(">");
+ html.append('>');
// Ensure we have an movie parameter
Map<String, String> parameters = state.parameters;
@@ -166,7 +166,7 @@ public class VEmbedded extends HTML {
// Add the parameters to the Embed
for (String name : parameters.keySet()) {
html.append(WidgetUtil.escapeAttribute(name));
- html.append("=");
+ html.append('=');
html.append("\"" + WidgetUtil.escapeAttribute(parameters.get(name))
+ "\"");
}
diff --git a/client/src/main/java/com/vaadin/client/ui/VFlash.java b/client/src/main/java/com/vaadin/client/ui/VFlash.java
index 6c45cf52ac..40f089428d 100644
--- a/client/src/main/java/com/vaadin/client/ui/VFlash.java
+++ b/client/src/main/java/com/vaadin/client/ui/VFlash.java
@@ -225,7 +225,7 @@ public class VFlash extends HTML {
}
// End object tag
- html.append(">");
+ html.append('>');
// Ensure we have an movie parameter
if (embedParams.get("movie") == null) {
@@ -263,7 +263,7 @@ public class VFlash extends HTML {
// Add the parameters to the Embed
for (String name : embedParams.keySet()) {
html.append(WidgetUtil.escapeAttribute(name));
- html.append("=");
+ html.append('=');
html.append("\"" + WidgetUtil.escapeAttribute(embedParams.get(name))
+ "\"");
}
diff --git a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
index f0b42f76d9..5e4fdb4d7d 100644
--- a/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/popupview/PopupViewConnector.java
@@ -111,17 +111,17 @@ public class PopupViewConnector extends AbstractHasComponentsConnector
.contains(VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN);
if (isAnimatingIn) {
- styleBuf.append(" ");
+ styleBuf.append(' ');
styleBuf.append(primaryName);
- styleBuf.append("-");
+ styleBuf.append('-');
styleBuf.append(VOverlay.ADDITIONAL_CLASSNAME_ANIMATE_IN);
}
if (ComponentStateUtil.hasStyles(getState())) {
for (String style : getState().styles) {
- styleBuf.append(" ");
+ styleBuf.append(' ');
styleBuf.append(primaryName);
- styleBuf.append("-");
+ styleBuf.append('-');
styleBuf.append(style);
}
}
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 eeeb3f6c6c..cef3b1525d 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
@@ -3127,7 +3127,7 @@ public class VScrollTable extends FlowPanel
if (s.equals(stylePrimaryName)) {
sb.append("-header-drag ");
} else {
- sb.append(" ");
+ sb.append(' ');
}
}
}
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
index 9d3e8726a6..4cfc7a2b19 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/calendar/CalendarConnector.java
@@ -185,7 +185,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector
if (hasEventListener(CalendarEventId.EVENTMOVE)) {
StringBuilder sb = new StringBuilder();
sb.append(DateUtil.formatClientSideDate(event.getStart()));
- sb.append("-");
+ sb.append('-');
sb.append(DateUtil
.formatClientSideTime(event.getStartTime()));
rpc.eventMove(event.getIndex(), sb.toString());
@@ -200,7 +200,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector
buffer.append(
DateUtil.formatClientSideDate(event.getStart()));
- buffer.append("-");
+ buffer.append('-');
buffer.append(DateUtil
.formatClientSideTime(event.getStartTime()));
@@ -209,7 +209,7 @@ public class CalendarConnector extends AbstractLegacyComponentConnector
buffer = new StringBuilder();
buffer.append(
DateUtil.formatClientSideDate(event.getEnd()));
- buffer.append("-");
+ buffer.append('-');
buffer.append(
DateUtil.formatClientSideTime(event.getEndTime()));
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
index 9030202638..b7e6a4f38e 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/RowItem.java
@@ -129,9 +129,9 @@ public final class RowItem implements Item {
s.append("ID:");
s.append(getId().toString());
for (Object propId : getItemPropertyIds()) {
- s.append("|");
+ s.append('|');
s.append(propId.toString());
- s.append(":");
+ s.append(':');
Object value = getItemProperty(propId).getValue();
s.append((null != value) ? value.toString() : null);
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java
index 8c1282673e..bc5cfc56a3 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/FreeformQuery.java
@@ -471,7 +471,7 @@ public class FreeformQuery extends AbstractTransactionalQuery
if (keys[ix] == null) {
where.append(" IS NULL");
} else {
- where.append(" = '").append(keys[ix]).append("'");
+ where.append(" = '").append(keys[ix]).append('\'');
}
if (ix < primaryKeyColumns.size() - 1) {
where.append(" AND ");
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java
index 065f16c029..b415c5ac51 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/TableQuery.java
@@ -439,10 +439,10 @@ public class TableQuery extends AbstractTransactionalQuery
if (fullTableName == null) {
StringBuilder sb = new StringBuilder();
if (catalogName != null) {
- sb.append(catalogName).append(".");
+ sb.append(catalogName).append('.');
}
if (schemaName != null) {
- sb.append(schemaName).append(".");
+ sb.append(schemaName).append('.');
}
sb.append(tableName);
fullTableName = sb.toString();
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
index 2c8ff8b126..88fc18084c 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java
@@ -213,12 +213,12 @@ public class DefaultSQLGenerator implements SQLGenerator {
if (!first) {
query.append(", ");
}
- query.append("?");
+ query.append('?');
sh.addParameterValue(columnToValueMap.get(column),
item.getItemProperty(column).getType());
first = false;
}
- query.append(")");
+ query.append(')');
sh.setQueryString(query.toString());
return sh;
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java
index bc7c659f07..34f93ec038 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/OracleGenerator.java
@@ -88,7 +88,7 @@ public class OracleGenerator extends DefaultSQLGenerator {
query.append(
QueryBuilder.getWhereStringForFilters(filters, sh));
}
- query.append(")");
+ query.append(')');
sh.setQueryString(query.toString());
return sh;
}
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
index b435757e8e..6bd65de0dc 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/query/generator/filter/QueryBuilder.java
@@ -94,7 +94,7 @@ public class QueryBuilder implements Serializable {
StringBuilder result = new StringBuilder();
for (Filter f : filters) {
result.append(getWhereStringForFilter(f, sh));
- result.append(" ").append(joinString).append(" ");
+ result.append(' ').append(joinString).append(' ');
}
// Remove the last instance of joinString
result.delete(result.length() - joinString.length() - 2,
diff --git a/server/src/main/java/com/vaadin/navigator/Navigator.java b/server/src/main/java/com/vaadin/navigator/Navigator.java
index d65bad9db7..a21cdbcaac 100644
--- a/server/src/main/java/com/vaadin/navigator/Navigator.java
+++ b/server/src/main/java/com/vaadin/navigator/Navigator.java
@@ -159,7 +159,7 @@ public class Navigator implements Serializable {
if (!ui.getUiRootPath().endsWith("/")) {
// make sure there is a '/' between the root path and the
// navigation state.
- sb.append("/");
+ sb.append('/');
}
sb.append(state);
URI location = ui.getPage().getLocation();
diff --git a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
index f65fc610c9..efbce4eeca 100644
--- a/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
+++ b/server/src/main/java/com/vaadin/server/ComponentSizeValidator.java
@@ -210,7 +210,7 @@ public class ComponentSizeValidator implements Serializable {
public void reportErrors(StringBuilder clientJSON,
PrintStream serverErrorStream) {
- clientJSON.append("{");
+ clientJSON.append('{');
Component parent = component.getParent();
String paintableId = component.getConnectorId();
@@ -282,16 +282,16 @@ public class ComponentSizeValidator implements Serializable {
boolean first = true;
for (InvalidLayout subError : subErrors) {
if (!first) {
- clientJSON.append(",");
+ clientJSON.append(',');
} else {
first = false;
}
subError.reportErrors(clientJSON, serverErrorStream);
}
- clientJSON.append("]");
+ clientJSON.append(']');
serverErrorStream.println("<< Sub erros");
}
- clientJSON.append("}");
+ clientJSON.append('}');
}
}
@@ -385,7 +385,7 @@ public class ComponentSizeValidator implements Serializable {
err.append("- ");
err.append(component.getClass().getSimpleName());
- err.append("/").append(Integer.toHexString(component.hashCode()));
+ err.append('/').append(Integer.toHexString(component.hashCode()));
if (component.getCaption() != null) {
err.append(" \"");
@@ -399,8 +399,8 @@ public class ComponentSizeValidator implements Serializable {
}
if (createLoc != null) {
- err.append(", created at (").append(createLoc.file).append(":")
- .append(createLoc.lineNumber).append(")");
+ err.append(", created at (").append(createLoc.file).append(':')
+ .append(createLoc.lineNumber).append(')');
}
@@ -408,11 +408,11 @@ public class ComponentSizeValidator implements Serializable {
err.append(" (");
err.append(attribute);
if (sizeLoc != null) {
- err.append(", set at (").append(sizeLoc.file).append(":")
- .append(sizeLoc.lineNumber).append(")");
+ err.append(", set at (").append(sizeLoc.file).append(':')
+ .append(sizeLoc.lineNumber).append(')');
}
- err.append(")");
+ err.append(')');
}
err.append("\n");
@@ -452,10 +452,9 @@ public class ComponentSizeValidator implements Serializable {
} else if (parent instanceof GridLayout) {
GridLayout gl = (GridLayout) parent;
Area componentArea = gl.getComponentArea(component);
- for (int row = componentArea.getRow1();
- row <= componentArea.getRow2(); row++) {
- for (int column = 0;
- column < gl.getColumns(); column++) {
+ for (int row = componentArea.getRow1(); row <= componentArea
+ .getRow2(); row++) {
+ for (int column = 0; column < gl.getColumns(); column++) {
Component c = gl.getComponent(column, row);
if (c != null) {
if (!hasRelativeHeight(c)) {
@@ -560,8 +559,8 @@ public class ComponentSizeValidator implements Serializable {
} else if (parent instanceof GridLayout) {
GridLayout gl = (GridLayout) parent;
Area componentArea = gl.getComponentArea(component);
- for (int col = componentArea.getColumn1();
- col <= componentArea.getColumn2(); col++) {
+ for (int col = componentArea.getColumn1(); col <= componentArea
+ .getColumn2(); col++) {
for (int row = 0; row < gl.getRows(); row++) {
Component c = gl.getComponent(col, row);
if (c != null) {
diff --git a/server/src/main/java/com/vaadin/server/JsonPaintTarget.java b/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
index 3be04fc2c4..3fef4926d3 100644
--- a/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
+++ b/server/src/main/java/com/vaadin/server/JsonPaintTarget.java
@@ -408,7 +408,7 @@ public class JsonPaintTarget implements PaintTarget {
sb.append("\"");
sb.append(name);
sb.append("\":");
- sb.append("{");
+ sb.append('{');
for (Iterator<?> it = value.keySet().iterator(); it.hasNext();) {
Object key = it.next();
Object mapValue = value.get(key);
@@ -429,10 +429,10 @@ public class JsonPaintTarget implements PaintTarget {
sb.append("\"");
}
if (it.hasNext()) {
- sb.append(",");
+ sb.append(',');
}
}
- sb.append("}");
+ sb.append('}');
tag.addAttribute(sb.toString());
}
@@ -448,13 +448,13 @@ public class JsonPaintTarget implements PaintTarget {
buf.append("\"").append(name).append("\":[");
for (int i = 0; i < values.length; i++) {
if (i > 0) {
- buf.append(",");
+ buf.append(',');
}
buf.append("\"");
buf.append(escapeJSON(values[i].toString()));
buf.append("\"");
}
- buf.append("]");
+ buf.append(']');
tag.addAttribute(buf.toString());
}
@@ -753,7 +753,7 @@ public class JsonPaintTarget implements PaintTarget {
data.append(attributesAsJsonObject());
data.append(getData());
// Writes the end (closing) tag
- data.append("]");
+ data.append(']');
tagClosed = true;
}
}
@@ -774,7 +774,7 @@ public class JsonPaintTarget implements PaintTarget {
}
public void closeChildrenArray() {
- // append("]");
+ // append(']');
// firstField = false;
}
@@ -821,17 +821,17 @@ public class JsonPaintTarget implements PaintTarget {
private String attributesAsJsonObject() {
final StringBuilder buf = new StringBuilder();
buf.append(startField());
- buf.append("{");
+ buf.append('{');
for (final Iterator<Object> iter = attr.iterator(); iter
.hasNext();) {
final String element = (String) iter.next();
buf.append(element);
if (iter.hasNext()) {
- buf.append(",");
+ buf.append(',');
}
}
buf.append(tag.variablesAsJsonObject());
- buf.append("}");
+ buf.append('}');
return buf.toString();
}
@@ -851,10 +851,10 @@ public class JsonPaintTarget implements PaintTarget {
final Variable element = (Variable) iter.next();
buf.append(element.getJsonPresentation());
if (iter.hasNext()) {
- buf.append(",");
+ buf.append(',');
}
}
- buf.append("}");
+ buf.append('}');
return buf.toString();
}
}
@@ -972,10 +972,10 @@ public class JsonPaintTarget implements PaintTarget {
sb.append("\"");
i++;
if (i < value.length) {
- sb.append(",");
+ sb.append(',');
}
}
- sb.append("]");
+ sb.append(']');
return sb.toString();
}
}
diff --git a/server/src/main/java/com/vaadin/server/VaadinServlet.java b/server/src/main/java/com/vaadin/server/VaadinServlet.java
index edfbd1cc28..fff04caf45 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServlet.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServlet.java
@@ -1510,7 +1510,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
} else {
safe.append("&#");
safe.append((int) c);
- safe.append(";");
+ safe.append(';');
}
}
diff --git a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
index beedc52a45..58e937e8a2 100644
--- a/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
+++ b/server/src/main/java/com/vaadin/ui/AbsoluteLayout.java
@@ -676,20 +676,20 @@ public class AbsoluteLayout extends AbstractLayout
Component newChild = designContext.readDesign(childComponent);
StringBuilder css = new StringBuilder();
if (attr.hasKey(ATTR_TOP)) {
- css.append("top:").append(attr.get(ATTR_TOP)).append(";");
+ css.append("top:").append(attr.get(ATTR_TOP)).append(';');
}
if (attr.hasKey(ATTR_RIGHT)) {
- css.append("right:").append(attr.get(ATTR_RIGHT)).append(";");
+ css.append("right:").append(attr.get(ATTR_RIGHT)).append(';');
}
if (attr.hasKey(ATTR_BOTTOM)) {
- css.append("bottom:").append(attr.get(ATTR_BOTTOM)).append(";");
+ css.append("bottom:").append(attr.get(ATTR_BOTTOM)).append(';');
}
if (attr.hasKey(ATTR_LEFT)) {
- css.append("left:").append(attr.get(ATTR_LEFT)).append(";");
+ css.append("left:").append(attr.get(ATTR_LEFT)).append(';');
}
if (attr.hasKey(ATTR_Z_INDEX)) {
css.append("z-index:").append(attr.get(ATTR_Z_INDEX))
- .append(";");
+ .append(';');
}
addComponent(newChild, css.toString());
}
diff --git a/server/src/main/java/com/vaadin/ui/GridLayout.java b/server/src/main/java/com/vaadin/ui/GridLayout.java
index cc043927e9..b4d97018ce 100644
--- a/server/src/main/java/com/vaadin/ui/GridLayout.java
+++ b/server/src/main/java/com/vaadin/ui/GridLayout.java
@@ -652,14 +652,14 @@ public class GridLayout extends AbstractLayout
sb.append(component.getCaption());
sb.append("\"");
}
- sb.append(")");
+ sb.append(')');
sb.append(" is already added to ");
sb.append(existingArea.childData.column1);
- sb.append(",");
+ sb.append(',');
sb.append(existingArea.childData.column1);
- sb.append(",");
+ sb.append(',');
sb.append(existingArea.childData.row1);
- sb.append(",");
+ sb.append(',');
sb.append(existingArea.childData.row2);
sb.append("(column1, column2, row1, row2).");
diff --git a/server/src/main/java/com/vaadin/ui/UI.java b/server/src/main/java/com/vaadin/ui/UI.java
index 5d27c1de74..e8b9198111 100644
--- a/server/src/main/java/com/vaadin/ui/UI.java
+++ b/server/src/main/java/com/vaadin/ui/UI.java
@@ -214,13 +214,13 @@ public abstract class UI extends AbstractSingleComponentContainer
.validateLayouts(UI.this);
StringBuilder json = new StringBuilder();
json.append("{\"invalidLayouts\":");
- json.append("[");
+ json.append('[');
if (invalidSizes != null) {
boolean first = true;
for (InvalidLayout invalidSize : invalidSizes) {
if (!first) {
- json.append(",");
+ json.append(',');
} else {
first = false;
}
diff --git a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
index 128e8bcb97..cf5051abb4 100644
--- a/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
+++ b/server/src/main/java/com/vaadin/ui/components/grid/GridDragSource.java
@@ -61,14 +61,15 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
/**
* Default drag data generator for Grid. It creates a list of row values
* separated by a tabulator character ({@code \t}).
+ *
* <pre>
- * "column1_value\tcolumn2_value\t ... columnN_value"
+ * "column1_value\tcolumn2_value\t ... columnN_value"
* </pre>
*/
private final SerializableFunction<T, String> defaultGridGenerator = item -> {
StringBuilder generatedValue = new StringBuilder();
getParent().getColumns().forEach(column -> {
- generatedValue.append("\t"); // Tab separated values
+ generatedValue.append("\t"); // Tab separated values
generatedValue.append(column.getValueProvider().apply(item));
});
return generatedValue.substring(1);
@@ -92,8 +93,8 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
generatorFunctions = new HashMap<>();
// Set default generator function for "text" parameter
- generatorFunctions
- .put(DragSourceState.DATA_TYPE_TEXT, defaultGridGenerator);
+ generatorFunctions.put(DragSourceState.DATA_TYPE_TEXT,
+ defaultGridGenerator);
}
@Override
@@ -163,6 +164,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
* type} data.
* <p>
* Example, building a JSON object that contains the item's values:
+ *
* <pre>
* dragSourceExtension.setDragDataGenerator("application/json", item ->
* {
@@ -181,12 +183,13 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
* </pre>
*
* @param type
- * Type of the generated data. The generated value will be
- * accessible during drop using this type.
+ * Type of the generated data. The generated value will be
+ * accessible during drop using this type.
* @param generator
- * Function to be executed on row data generation.
+ * Function to be executed on row data generation.
*/
- public void setDragDataGenerator(String type, SerializableFunction<T, String> generator) {
+ public void setDragDataGenerator(String type,
+ SerializableFunction<T, String> generator) {
generatorFunctions.put(type, generator);
}
@@ -194,7 +197,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
* Remove the generator function set for the given type.
*
* @param type
- * Type of the generator to be removed.
+ * Type of the generator to be removed.
*/
public void clearDragDataGenerator(String type) {
generatorFunctions.remove(type);
@@ -204,7 +207,7 @@ public class GridDragSource<T> extends DragSourceExtension<Grid<T>> {
* Returns the drag data generator function for the given type.
*
* @param type
- * Type of the generated data.
+ * Type of the generated data.
* @return Drag data generator function for the given type.
*/
public SerializableFunction<T, String> getDragDataGenerator(String type) {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/Design.java b/server/src/main/java/com/vaadin/ui/declarative/Design.java
index 78288737a0..761ce3c355 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/Design.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/Design.java
@@ -302,7 +302,7 @@ public class Design implements Serializable {
Character c = className.charAt(i);
if (Character.isUpperCase(c)) {
if (i > 0) {
- result.append("-");
+ result.append('-');
}
result.append(Character.toLowerCase(c));
} else {
diff --git a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
index cdf0c6aaee..5b5887316c 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/DesignAttributeHandler.java
@@ -328,7 +328,7 @@ public class DesignAttributeHandler implements Serializable {
StringBuilder builder = new StringBuilder();
for (int i = 0; i < words.length; i++) {
if (builder.length() != 0) {
- builder.append("-");
+ builder.append('-');
}
builder.append(words[i].toLowerCase());
}
diff --git a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
index aade7e80b7..63f509c9ce 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/converters/DesignShortcutActionConverter.java
@@ -166,13 +166,13 @@ public class DesignShortcutActionConverter
// handle modifiers
if (value.getModifiers() != null) {
for (int modifier : value.getModifiers()) {
- sb.append(getStringForKeycode(modifier)).append("-");
+ sb.append(getStringForKeycode(modifier)).append('-');
}
}
// handle keycode
sb.append(getStringForKeycode(value.getKeyCode()));
if (value.getCaption() != null) {
- sb.append(" ").append(value.getCaption());
+ sb.append(' ').append(value.getCaption());
}
return sb.toString();
}
diff --git a/server/src/main/java/com/vaadin/util/ConnectorHelper.java b/server/src/main/java/com/vaadin/util/ConnectorHelper.java
index 46b4ba4bf1..480724ae5e 100644
--- a/server/src/main/java/com/vaadin/util/ConnectorHelper.java
+++ b/server/src/main/java/com/vaadin/util/ConnectorHelper.java
@@ -92,7 +92,7 @@ public class ConnectorHelper {
topClass = topClass.getEnclosingClass();
}
builder.append(connectorClass.getName());
- builder.append("(");
+ builder.append('(');
builder.append(topClass.getSimpleName());
builder.append(".java:1)");
}
diff --git a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
index 041df2deee..609ec6d620 100644
--- a/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
+++ b/server/src/test/java/com/vaadin/tests/design/DeclarativeTestBaseBase.java
@@ -277,15 +277,15 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
}
Collections.sort(names);
- sb.append("<").append(producedElem.tagName()).append("");
+ sb.append('<').append(producedElem.tagName());
for (String attrName : names) {
- sb.append(" ").append(attrName);
+ sb.append(' ').append(attrName);
if (!booleanAttributes.contains(attrName)) {
- sb.append("=").append("\'").append(producedElem.attr(attrName))
+ sb.append('=').append("\'").append(producedElem.attr(attrName))
.append("\'");
}
}
- sb.append(">");
+ sb.append('>');
for (Node child : producedElem.childNodes()) {
if (child instanceof Element) {
elementToHtml((Element) child, sb);
@@ -294,7 +294,7 @@ public abstract class DeclarativeTestBaseBase<T extends Component> {
sb.append(text.trim());
}
}
- sb.append("</").append(producedElem.tagName()).append(">");
+ sb.append("</").append(producedElem.tagName()).append('>');
return sb.toString();
}
diff --git a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
index 65b7b437e0..79cbd59d6e 100644
--- a/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/clientconnector/AttachDetachListenersTest.java
@@ -163,7 +163,7 @@ public class AttachDetachListenersTest {
buffer.append("expected ")
.append(expected.getClass().getSimpleName())
.append(" with connector ").append(expected.getConnector());
- buffer.append(")");
+ buffer.append(')');
}
@Override
diff --git a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
index 3f07d1c178..395d1b1584 100644
--- a/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
+++ b/server/src/test/java/com/vaadin/tests/util/GraphVizClassHierarchyCreator.java
@@ -50,14 +50,14 @@ public class GraphVizClassHierarchyCreator {
header.append(" node [shape = ellipse, style=\"dotted\"] ");
for (Class c : classesAndParents) {
if (!c.isInterface() && Modifier.isAbstract(c.getModifiers())) {
- header.append(c.getSimpleName()).append(" ");
+ header.append(c.getSimpleName()).append(' ');
}
}
if (includeInterfaces) {
System.out.print(" node [shape = ellipse, style=\"solid\"] ");
for (Class c : classesAndParents) {
if (c.isInterface()) {
- header.append(c.getSimpleName()).append(" ");
+ header.append(c.getSimpleName()).append(' ');
}
}
header.append(";\n");
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
index 790ee06c20..45f0bb47fe 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForStyledUpload.java
@@ -161,12 +161,12 @@ public class TestForStyledUpload extends LegacyApplication
if (up.isUploading()) {
sb.append("Uploading...");
sb.append(up.getBytesRead());
- sb.append("/");
+ sb.append('/');
sb.append(up.getUploadSize());
- sb.append(" ");
+ sb.append(' ');
sb.append(Math.round(
100 * up.getBytesRead() / (double) up.getUploadSize()));
- sb.append("%");
+ sb.append('%');
} else {
sb.append("Idle");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
index 24e4683f5e..5d858aadd6 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestForUpload.java
@@ -278,12 +278,12 @@ public class TestForUpload extends CustomComponent
if (up.isUploading()) {
sb.append("Uploading...");
sb.append(up.getBytesRead());
- sb.append("/");
+ sb.append('/');
sb.append(up.getUploadSize());
- sb.append(" ");
+ sb.append(' ');
sb.append(Math.round(
100 * up.getBytesRead() / (double) up.getUploadSize()));
- sb.append("%");
+ sb.append('%');
} else {
sb.append("Idle");
}
diff --git a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
index 40e7f82014..68856973fd 100644
--- a/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
+++ b/uitest/src/main/java/com/vaadin/tests/TestSizeableIncomponents.java
@@ -246,15 +246,15 @@ public class TestSizeableIncomponents extends LegacyApplication {
public String getTestableName() {
StringBuffer sb = new StringBuffer();
sb.append(classToTest.getName().replaceAll("com.vaadin.ui.", ""));
- sb.append("[");
+ sb.append('[');
for (Iterator<Configuration> i = configurations.iterator(); i
.hasNext();) {
sb.append((i.next()).getDescription());
if (i.hasNext()) {
- sb.append(",");
+ sb.append(',');
}
}
- sb.append("]");
+ sb.append(']');
return sb.toString();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
index a71952d53e..d0bd23110e 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/grid/GridDragAndDrop.java
@@ -132,13 +132,13 @@ public class GridDragAndDrop extends AbstractTestUIWithLog {
// Set data generator
dragSource.setDragDataGenerator("application/json", person -> {
StringBuilder builder = new StringBuilder();
- builder.append("{");
+ builder.append('{');
builder.append("\"First Name\":");
builder.append("\"" + person.getFirstName() + "\"");
- builder.append(",");
+ builder.append(',');
builder.append("\"Last Name\":");
builder.append("\"" + person.getLastName() + "\"");
- builder.append("}");
+ builder.append('}');
return builder.toString();
});
diff --git a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
index 936289223d..af091b9036 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/table/HiddenColumnsExpandRatios.java
@@ -57,7 +57,7 @@ public class HiddenColumnsExpandRatios extends TestBase {
String[] strings = { "foo", "bar", "baz" };
for (int i = 0; i < 5; i++) {
str.append(strings[Math.abs(rnd.nextInt() % strings.length)])
- .append(" ");
+ .append(' ');
}
return str.toString();
}
diff --git a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
index b7995e7b8a..8eba127abd 100644
--- a/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
+++ b/uitest/src/main/java/com/vaadin/tests/components/window/WindowCloseShortcuts.java
@@ -173,10 +173,10 @@ public class WindowCloseShortcuts extends AbstractTestUI {
sb.append("<" + producedElem.tagName() + "");
for (String attrName : names) {
- sb.append(" ").append(attrName).append("=").append("\'")
+ sb.append(' ').append(attrName).append('=').append("\'")
.append(producedElem.attr(attrName)).append("\'");
}
- sb.append(">");
+ sb.append('>');
for (Node child : producedElem.childNodes()) {
if (child instanceof Element) {
elementToHtml((Element) child, sb);
@@ -185,7 +185,7 @@ public class WindowCloseShortcuts extends AbstractTestUI {
sb.append(text.trim());
}
}
- sb.append("</").append(producedElem.tagName()).append(">");
+ sb.append("</").append(producedElem.tagName()).append('>');
return sb.toString();
}