diff options
author | Ahmed Ashour <asashour@yahoo.com> | 2017-10-20 08:59:17 +0200 |
---|---|---|
committer | Péter Török <31210544+torok-peter@users.noreply.github.com> | 2017-10-20 09:59:17 +0300 |
commit | 780e9cee6b7e976285402a00ad5b282a8e79619e (patch) | |
tree | fd3aec572018a6b0b32d63d0f5b424413d39dfea /test/servlet-containers | |
parent | 70ba487b622ab13aa39f45cb53507065c180dc56 (diff) | |
download | vaadin-framework-780e9cee6b7e976285402a00ad5b282a8e79619e.tar.gz vaadin-framework-780e9cee6b7e976285402a00ad5b282a8e79619e.zip |
Simplify lambda expressions (#10198)
* Simplify lambda expressions
And remove unneeded 'return' keyword.
* Format
Diffstat (limited to 'test/servlet-containers')
2 files changed, 6 insertions, 8 deletions
diff --git a/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java b/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java index 1da8cc51ff..26cf31628a 100644 --- a/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java +++ b/test/servlet-containers/karaf/vaadin-karaf-bundle1/src/main/java/com/vaadin/test/osgi/myapplication1/MyUI.java @@ -2,11 +2,11 @@ package com.vaadin.test.osgi.myapplication1; import javax.servlet.annotation.WebServlet; -import com.vaadin.annotations.Theme; -import com.vaadin.annotations.Widgetset; import org.osgi.service.component.annotations.Component; +import com.vaadin.annotations.Theme; import com.vaadin.annotations.VaadinServletConfiguration; +import com.vaadin.annotations.Widgetset; import com.vaadin.server.VaadinRequest; import com.vaadin.server.VaadinServlet; import com.vaadin.ui.Button; @@ -27,9 +27,8 @@ public class MyUI extends UI { name.setCaption("Type your name here:"); Button button = new Button("Click Me"); - button.addClickListener(e -> { - layout.addComponent(new Label("Thanks " + name.getValue() + ", it works!")); - }); + button.addClickListener(e -> layout.addComponent( + new Label("Thanks " + name.getValue() + ", it works!"))); layout.addComponents(name, button); diff --git a/test/servlet-containers/karaf/vaadin-karaf-bundle2/src/main/java/com/vaadin/test/osgi/myapplication/MyUI.java b/test/servlet-containers/karaf/vaadin-karaf-bundle2/src/main/java/com/vaadin/test/osgi/myapplication/MyUI.java index 14529ecea1..6a83b7b611 100644 --- a/test/servlet-containers/karaf/vaadin-karaf-bundle2/src/main/java/com/vaadin/test/osgi/myapplication/MyUI.java +++ b/test/servlet-containers/karaf/vaadin-karaf-bundle2/src/main/java/com/vaadin/test/osgi/myapplication/MyUI.java @@ -23,9 +23,8 @@ public class MyUI extends UI { name.setCaption("Type your name here:"); Button button = new Button("Click Me"); - button.addClickListener(e -> { - layout.addComponent(new Label("Thanks " + name.getValue() + ", it works!")); - }); + button.addClickListener(e -> layout.addComponent( + new Label("Thanks " + name.getValue() + ", it works!"))); layout.addComponents(name, button); |