diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-09-13 12:35:24 +0200 |
---|---|---|
committer | Henri Sara <henri.sara@gmail.com> | 2017-09-13 14:32:50 +0300 |
commit | 03349e8c6697d668e675e628783b52eef39b877b (patch) | |
tree | 3fea8507c1cdf457b0c47bdd4970ed7c07cc39c7 /compatibility-client | |
parent | 29cc151f37ee6e56910d6bb80ade321f08b26486 (diff) | |
download | vaadin-framework-03349e8c6697d668e675e628783b52eef39b877b.tar.gz vaadin-framework-03349e8c6697d668e675e628783b52eef39b877b.zip |
Simplify boolean expressions
Diffstat (limited to 'compatibility-client')
-rw-r--r-- | compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java index 73898de0b1..a59e61d9dc 100644 --- a/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java +++ b/compatibility-client/src/main/java/com/vaadin/v7/client/widgets/Grid.java @@ -1750,10 +1750,10 @@ public class Grid<T> extends ResizeComposite implements HasSelectionHandlers<T>, * if the editor handler is not set */ public void setEnabled(boolean enabled) { - if (enabled == false && state != State.INACTIVE) { + if (!enabled && state != State.INACTIVE) { throw new IllegalStateException( "Cannot disable: editor is in edit mode"); - } else if (enabled == true && getHandler() == null) { + } else if (enabled && getHandler() == null) { throw new IllegalStateException( "Cannot enable: EditorHandler not set"); } |