diff options
author | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-03 07:29:32 +0000 |
---|---|---|
committer | Pekka Hyvönen <pekka@vaadin.com> | 2016-11-03 09:38:01 +0200 |
commit | f5048f21bf12a291c6e6e537f82553049bfd67d5 (patch) | |
tree | 5a657b9cb29c31d66b5477c23d46aef734c613a5 /server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java | |
parent | 01f0de8858e80b5bed12deeb3ecf8e70b0a1f9d9 (diff) | |
download | vaadin-framework-f5048f21bf12a291c6e6e537f82553049bfd67d5.tar.gz vaadin-framework-f5048f21bf12a291c6e6e537f82553049bfd67d5.zip |
Revert "Convert to for-each loop, Stream and switch-over-strings"
This reverts commit 73078c7560d40db80dae6a6fb8047c29a92dd8d0.
Change-Id: I2757232d1312ae5162550d9fafb26c2d657c1b7f
Diffstat (limited to 'server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java')
-rw-r--r-- | server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java index ac530c266f..0711ae24bf 100644 --- a/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java +++ b/server/src/test/java/com/vaadin/data/BinderConverterValidatorTest.java @@ -235,15 +235,14 @@ public class BinderConverterValidatorTest throw new IllegalArgumentException( "Value must be OK or NOTOK"); }, model -> { - switch (model) { - case "1": - return "OK"; - case "2": - return "NOTOK"; - default: - throw new IllegalArgumentException( - "Value in model must be 1 or 2"); - } + if (model.equals("1")) { + return "OK"; + } else if (model.equals("2")) { + return "NOTOK"; + } else { + throw new IllegalArgumentException( + "Value in model must be 1 or 2"); + } }); binding.bind(StatusBean::getStatus, StatusBean::setStatus); binder.setBean(bean); |