summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-11-26 15:01:02 +0200
committerLeif Åstrand <leif@vaadin.com>2012-11-26 15:01:02 +0200
commit4457324ff11dcaf848dd7364b74f8b0b47783e59 (patch)
tree9582c3064bda9e2e845c4473ce154bdfdeba4a2e /uitest
parentb010b21a15dfd47790255e36122d3b30682d4990 (diff)
downloadvaadin-framework-4457324ff11dcaf848dd7364b74f8b0b47783e59.tar.gz
vaadin-framework-4457324ff11dcaf848dd7364b74f8b0b47783e59.zip
Don't make VaadinSession serialize VaadinService (#10088)
* Refactor ApplicationRunnerServlet UIProvider to avoid indirect reference through anonymous inner class Change-Id: Ie4148e633192b1940ba82edbd26fbbc0cc2c4da3
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java22
1 files changed, 15 insertions, 7 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
index 8e8d94bcbd..6b6044ab5b 100644
--- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -139,13 +139,8 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
try {
final Class<?> classToRun = getClassToRun();
if (UI.class.isAssignableFrom(classToRun)) {
- session.addUIProvider(new UIProvider() {
- @Override
- public Class<? extends UI> getUIClass(
- UIClassSelectionEvent event) {
- return (Class<? extends UI>) classToRun;
- }
- });
+ session.addUIProvider(new ApplicationRunnerUIProvider(
+ classToRun));
} else if (LegacyApplication.class.isAssignableFrom(classToRun)) {
// Avoid using own UIProvider for legacy Application
} else if (UIProvider.class.isAssignableFrom(classToRun)) {
@@ -171,6 +166,19 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
return getApplicationRunnerURIs(request).applicationClassname;
}
+ private static final class ApplicationRunnerUIProvider extends UIProvider {
+ private final Class<?> classToRun;
+
+ private ApplicationRunnerUIProvider(Class<?> classToRun) {
+ this.classToRun = classToRun;
+ }
+
+ @Override
+ public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
+ return (Class<? extends UI>) classToRun;
+ }
+ }
+
// TODO Don't need to use a data object now that there's only one field
private static class URIS {
// String staticFilesPath;