aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed Ashour <asashour@yahoo.com>2017-10-02 10:23:09 +0200
committerHenri Sara <henri.sara@gmail.com>2017-10-02 11:23:09 +0300
commit43f4a17f0d17e584e83ea3faaa40ac1def1dd4b1 (patch)
tree8941d036822a00f7c893278d47ebc071f1236308
parent763a5cbe8c13ff4a169aae9062c643ad1588cea0 (diff)
downloadvaadin-framework-43f4a17f0d17e584e83ea3faaa40ac1def1dd4b1.tar.gz
vaadin-framework-43f4a17f0d17e584e83ea3faaa40ac1def1dd4b1.zip
Simplify conditional logic. (#10122)
And remove unused imports.
-rw-r--r--client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java1
-rw-r--r--client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java3
-rw-r--r--client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java4
-rw-r--r--client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java3
-rw-r--r--compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java6
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java4
-rw-r--r--compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java7
-rw-r--r--uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java1
-rw-r--r--uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java1
10 files changed, 5 insertions, 28 deletions
diff --git a/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java b/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
index 6b26adfa0a..d0bf748a93 100644
--- a/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
+++ b/client/src/main/java/com/vaadin/client/ui/ShortcutActionHandler.java
@@ -17,7 +17,6 @@
package com.vaadin.client.ui;
import java.util.ArrayList;
-import java.util.Iterator;
import com.google.gwt.core.client.Scheduler;
import com.google.gwt.dom.client.Element;
diff --git a/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java b/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
index eac2ffd11e..f9b95e1f97 100644
--- a/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/button/ButtonConnector.java
@@ -18,11 +18,8 @@ package com.vaadin.client.ui.button;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.user.client.DOM;
import com.vaadin.client.MouseEventDetailsBuilder;
-import com.vaadin.client.StyleConstants;
import com.vaadin.client.VCaption;
-import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.ConnectorFocusAndBlurHandler;
diff --git a/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java b/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
index c02607790f..0a4dd32a19 100644
--- a/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/checkbox/CheckBoxConnector.java
@@ -15,16 +15,13 @@
*/
package com.vaadin.client.ui.checkbox;
-import com.google.gwt.dom.client.Style.Display;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Event;
import com.vaadin.client.MouseEventDetailsBuilder;
-import com.vaadin.client.StyleConstants;
import com.vaadin.client.VCaption;
import com.vaadin.client.VTooltip;
-import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.client.annotations.OnStateChange;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractFieldConnector;
diff --git a/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java b/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
index edc5449127..1d04f73f72 100644
--- a/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/link/LinkConnector.java
@@ -16,11 +16,7 @@
package com.vaadin.client.ui.link;
-import com.google.gwt.dom.client.Style.Display;
-import com.google.gwt.user.client.DOM;
-import com.vaadin.client.StyleConstants;
import com.vaadin.client.VCaption;
-import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.Icon;
diff --git a/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java b/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
index 5560e9825c..b10ac17c08 100644
--- a/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
+++ b/client/src/main/java/com/vaadin/client/ui/nativebutton/NativeButtonConnector.java
@@ -15,10 +15,7 @@
*/
package com.vaadin.client.ui.nativebutton;
-import com.google.gwt.user.client.DOM;
-import com.vaadin.client.StyleConstants;
import com.vaadin.client.VCaption;
-import com.vaadin.client.WidgetUtil.ErrorUtil;
import com.vaadin.client.communication.StateChangeEvent;
import com.vaadin.client.ui.AbstractComponentConnector;
import com.vaadin.client.ui.ConnectorFocusAndBlurHandler;
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java
index cd1754edf8..9bfb6c1eeb 100644
--- a/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java
+++ b/compatibility-client/src/main/java/com/vaadin/v7/client/ui/VFilterSelect.java
@@ -1686,11 +1686,7 @@ public class VFilterSelect extends Composite
* last page
*/
public boolean hasNextPage() {
- if (pageLength > 0 && totalMatches > (currentPage + 1) * pageLength) {
- return true;
- } else {
- return false;
- }
+ return pageLength > 0 && totalMatches > (currentPage + 1) * pageLength;
}
/**
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
index 6a3c26a578..54959822a7 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/AbstractProperty.java
@@ -18,7 +18,6 @@ package com.vaadin.v7.data.util;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
-import java.util.logging.Logger;
import com.vaadin.data.Binder;
import com.vaadin.data.ValueProvider;
@@ -33,7 +32,8 @@ import com.vaadin.v7.data.Property;
*
* @since 6.6
*
- * @deprecated As of 8.0, replaced by {@link ValueProvider}, {@link Setter}, see {@link Binder}
+ * @deprecated As of 8.0, replaced by {@link ValueProvider}, {@link Setter}, see
+ * {@link Binder}
*/
@Deprecated
public abstract class AbstractProperty<T> implements Property<T>,
diff --git a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java
index 6edf06edd3..b6f9e37c22 100644
--- a/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java
+++ b/compatibility-server/src/main/java/com/vaadin/v7/data/util/sqlcontainer/ColumnProperty.java
@@ -18,7 +18,6 @@ package com.vaadin.v7.data.util.sqlcontainer;
import java.sql.Date;
import java.sql.Time;
import java.sql.Timestamp;
-import java.util.logging.Logger;
import com.vaadin.v7.data.Property;
import com.vaadin.v7.data.util.converter.Converter.ConversionException;
@@ -30,6 +29,7 @@ import com.vaadin.v7.data.util.converter.Converter.ConversionException;
*
* Note that depending on the QueryDelegate in use this does not necessarily map
* into an actual column in a database table.
+ *
* @deprecated As of 8.0, no replacement available.
*/
@Deprecated
@@ -294,11 +294,8 @@ public final class ColumnProperty implements Property {
public boolean isPersistent() {
if (isVersionColumn()) {
return false;
- } else if (isReadOnlyChangeAllowed() && !isReadOnly()) {
- return true;
- } else {
- return false;
}
+ return isReadOnlyChangeAllowed() && !isReadOnly();
}
/**
diff --git a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
index b971f1cc94..3734581ef2 100644
--- a/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
+++ b/uitest/src/main/java/com/vaadin/tests/validation/FieldErrorIndication.java
@@ -27,7 +27,6 @@ import com.vaadin.v7.data.Validator;
import com.vaadin.v7.data.validator.StringLengthValidator;
import com.vaadin.v7.ui.AbstractField;
import com.vaadin.v7.ui.ComboBox;
-import com.vaadin.v7.ui.Field;
import com.vaadin.v7.ui.ListSelect;
import com.vaadin.v7.ui.NativeSelect;
import com.vaadin.v7.ui.PasswordField;
diff --git a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
index 771f7528af..945e80738e 100644
--- a/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
+++ b/uitest/src/test/java/com/vaadin/tests/tooltip/TooltipInWindowTest.java
@@ -18,7 +18,6 @@ package com.vaadin.tests.tooltip;
import org.junit.Test;
import org.openqa.selenium.WebElement;
-import com.vaadin.testbench.By;
import com.vaadin.tests.tb3.TooltipTest;
/**