diff options
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractComponent.java | 10 | ||||
-rw-r--r-- | server/src/com/vaadin/ui/UI.java | 9 |
2 files changed, 10 insertions, 9 deletions
diff --git a/server/src/com/vaadin/ui/AbstractComponent.java b/server/src/com/vaadin/ui/AbstractComponent.java index 09b471cc36..f92024d3b3 100644 --- a/server/src/com/vaadin/ui/AbstractComponent.java +++ b/server/src/com/vaadin/ui/AbstractComponent.java @@ -263,9 +263,9 @@ public abstract class AbstractComponent extends AbstractClientConnector if (parent != null) { return parent.getLocale(); } - final VaadinSession app = getSession(); - if (app != null) { - return app.getLocale(); + final VaadinSession session = getSession(); + if (session != null) { + return session.getLocale(); } return null; } @@ -620,8 +620,8 @@ public abstract class AbstractComponent extends AbstractClientConnector */ protected void focus() { if (this instanceof Focusable) { - final VaadinSession app = getSession(); - if (app != null) { + final VaadinSession session = getSession(); + if (session != null) { getUI().setFocusedComponent((Focusable) this); delayedFocus = false; } else { diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index e0f984de0d..fc3df8d052 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -192,13 +192,13 @@ public abstract class UI extends AbstractComponentContainer implements * to an application */ public URL getURL() { - VaadinSession application = getSession(); - if (application == null) { + VaadinSession session = getSession(); + if (session == null) { return null; } try { - return new URL(application.getURL(), getName() + "/"); + return new URL(session.getURL(), getName() + "/"); } catch (MalformedURLException e) { throw new RuntimeException( "Internal problem getting window URL, please report"); @@ -705,7 +705,8 @@ public abstract class UI extends AbstractComponentContainer implements */ public void setSession(VaadinSession session) { if ((session == null) == (this.session == null)) { - throw new IllegalStateException("Application has already been set"); + throw new IllegalStateException( + "VaadinSession has already been set"); } else { if (session == null) { detach(); |