aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPer-Åke Minborg <minborg@speedment.com>2016-10-27 22:49:26 -0700
committerPekka Hyvönen <pekka@vaadin.com>2016-11-02 13:10:31 +0000
commite4bc497e919125ded160368958e8b63fb075897c (patch)
treed1bc7f20a6252bf0d8b74c8cbadd5f5a98285bba
parent526bd08524eeb2b9bd999d3e56969775088ba7a6 (diff)
downloadvaadin-framework-e4bc497e919125ded160368958e8b63fb075897c.tar.gz
vaadin-framework-e4bc497e919125ded160368958e8b63fb075897c.zip
Use operator assignments where possible
Change-Id: I80b73b653e97904605dc62484a7448f3bfbf7212
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinPortletSession.java4
-rw-r--r--server/src/main/java/com/vaadin/server/VaadinServlet.java4
-rw-r--r--server/src/main/java/com/vaadin/ui/Grid.java2
-rw-r--r--server/src/main/java/com/vaadin/ui/declarative/Design.java2
-rw-r--r--server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java2
-rw-r--r--server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java2
6 files changed, 8 insertions, 8 deletions
diff --git a/server/src/main/java/com/vaadin/server/VaadinPortletSession.java b/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
index 6a6cb429d3..f1b32efabe 100644
--- a/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
+++ b/server/src/main/java/com/vaadin/server/VaadinPortletSession.java
@@ -286,7 +286,7 @@ public class VaadinPortletSession extends VaadinSession {
if (response instanceof MimeResponse) {
String actionKey = "" + System.currentTimeMillis();
while (eventActionDestinationMap.containsKey(actionKey)) {
- actionKey = actionKey + ".";
+ actionKey += ".";
}
PortletURL actionUrl = generateActionURL(actionKey);
if (actionUrl != null) {
@@ -336,7 +336,7 @@ public class VaadinPortletSession extends VaadinSession {
if (response instanceof MimeResponse) {
String actionKey = "" + System.currentTimeMillis();
while (sharedParameterActionNameMap.containsKey(actionKey)) {
- actionKey = actionKey + ".";
+ actionKey += ".";
}
PortletURL actionUrl = generateActionURL(actionKey);
if (actionUrl != null) {
diff --git a/server/src/main/java/com/vaadin/server/VaadinServlet.java b/server/src/main/java/com/vaadin/server/VaadinServlet.java
index a2bf4fd5b0..d43db5c303 100644
--- a/server/src/main/java/com/vaadin/server/VaadinServlet.java
+++ b/server/src/main/java/com/vaadin/server/VaadinServlet.java
@@ -789,7 +789,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
// Remove milliseconds to avoid comparison problems (milliseconds
// are not returned by the browser in the "If-Modified-Since"
// header).
- lastModifiedTime = lastModifiedTime - lastModifiedTime % 1000;
+ lastModifiedTime -= lastModifiedTime % 1000;
response.setDateHeader("Last-Modified", lastModifiedTime);
if (browserHasNewestVersion(request, lastModifiedTime)) {
@@ -1360,7 +1360,7 @@ public class VaadinServlet extends HttpServlet implements Constants {
if (servletPath.length() == 0
|| servletPath.charAt(servletPath.length() - 1) != '/') {
- servletPath = servletPath + "/";
+ servletPath += "/";
}
URL u = new URL(reqURL, servletPath);
return u;
diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java
index 490f9bf8f2..6d2b2518b0 100644
--- a/server/src/main/java/com/vaadin/ui/Grid.java
+++ b/server/src/main/java/com/vaadin/ui/Grid.java
@@ -2529,7 +2529,7 @@ public class Grid<T> extends AbstractSingleSelect<T> implements HasComponents {
private String getGeneratedIdentifier() {
String columnId = "generatedColumn" + counter;
- counter = counter + 1;
+ counter++;
return columnId;
}
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 8ac0ef41a8..54abc38427 100644
--- a/server/src/main/java/com/vaadin/ui/declarative/Design.java
+++ b/server/src/main/java/com/vaadin/ui/declarative/Design.java
@@ -261,7 +261,7 @@ public class Design implements Serializable {
.toLowerCase(Locale.ENGLISH);
context.addPackagePrefix(prefix, packageName);
}
- prefix = prefix + "-";
+ prefix += "-";
String className = classNameToElementName(
componentClass.getSimpleName());
String tagName = prefix + className;
diff --git a/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java b/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
index c202dbb47f..d04789f353 100644
--- a/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
+++ b/server/src/test/java/com/vaadin/data/BeanBinderInstanceFieldTest.java
@@ -375,7 +375,7 @@ public class BeanBinderInstanceFieldTest {
Assert.assertEquals(ageField, form.noFieldInPerson);
form.firstName.setValue("aa");
- age = age + 56;
+ age += 56;
form.noFieldInPerson.setValue(String.valueOf(age));
Assert.assertEquals(personName, person.getFirstName());
diff --git a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
index 7b160106d8..1a1d15edcf 100644
--- a/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
+++ b/server/src/test/java/com/vaadin/tests/server/navigator/NavigatorTest.java
@@ -894,7 +894,7 @@ public class NavigatorTest {
@Override
protected void navigateTo(View view, String viewName,
String parameters) {
- count[0] = count[0] + 1;
+ count[0] += 1;
super.navigateTo(view, viewName, parameters);
}
};