diff options
Diffstat (limited to 'uitest/src/main/java/com/vaadin/launcher')
-rw-r--r-- | uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java | 23 | ||||
-rw-r--r-- | uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java | 9 |
2 files changed, 10 insertions, 22 deletions
diff --git a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java index a5c2d87295..8139f7a94c 100644 --- a/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/main/java/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -47,7 +47,6 @@ import com.vaadin.server.LegacyApplication; import com.vaadin.server.LegacyVaadinServlet; import com.vaadin.server.ServiceException; import com.vaadin.server.SystemMessages; -import com.vaadin.server.SystemMessagesInfo; import com.vaadin.server.SystemMessagesProvider; import com.vaadin.server.UIClassSelectionEvent; import com.vaadin.server.UICreateEvent; @@ -452,22 +451,16 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { deploymentConfiguration); final SystemMessagesProvider provider = service .getSystemMessagesProvider(); - service.setSystemMessagesProvider(new SystemMessagesProvider() { - - @Override - public SystemMessages getSystemMessages( - SystemMessagesInfo systemMessagesInfo) { - if (systemMessagesInfo.getRequest() == null) { - return provider.getSystemMessages(systemMessagesInfo); - } - Object messages = systemMessagesInfo.getRequest() - .getAttribute(CUSTOM_SYSTEM_MESSAGES_PROPERTY); - if (messages instanceof SystemMessages) { - return (SystemMessages) messages; - } + service.setSystemMessagesProvider(systemMessagesInfo -> { + if (systemMessagesInfo.getRequest() == null) { return provider.getSystemMessages(systemMessagesInfo); } - + Object messages = systemMessagesInfo.getRequest() + .getAttribute(CUSTOM_SYSTEM_MESSAGES_PROPERTY); + if (messages instanceof SystemMessages) { + return (SystemMessages) messages; + } + return provider.getSystemMessages(systemMessagesInfo); }); return service; } diff --git a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java index 545ebf8a13..655d67c132 100644 --- a/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/main/java/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -17,7 +17,6 @@ package com.vaadin.launcher; import java.io.File; -import java.io.FilenameFilter; import java.io.IOException; import java.io.OutputStream; import java.net.InetAddress; @@ -257,12 +256,8 @@ public class DevelopmentServerLauncher { server.start(); }); scanner.setReportExistingFilesOnStartup(false); - scanner.setFilenameFilter(new FilenameFilter() { - @Override - public boolean accept(File folder, String name) { - return name.endsWith(".class"); - } - }); + scanner.setFilenameFilter( + (folder, name) -> name.endsWith(".class")); scanner.setScanDirs(classFolders); scanner.start(); |