summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2011-12-22 15:15:40 +0200
committerMarc Englund <marc@vaadin.com>2011-12-22 15:15:52 +0200
commita90834512a08f46abede250e37050be7face417c (patch)
tree8b758529e4a9452ca07b0213541e36a134588e1e /src
parente2574afbe9c0267710b63d6f21a59c05eb6e6d88 (diff)
downloadvaadin-framework-a90834512a08f46abede250e37050be7face417c.tar.gz
vaadin-framework-a90834512a08f46abede250e37050be7face417c.zip
Changed how UnsupportedBrowserHandler 'singleton' stored to match app resource handler.
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java4
-rw-r--r--src/com/vaadin/terminal/gwt/server/UnsupportedBrowserHandler.java18
2 files changed, 5 insertions, 17 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
index 942f128862..83a6a807e3 100644
--- a/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
+++ b/src/com/vaadin/terminal/gwt/server/AbstractCommunicationManager.java
@@ -96,6 +96,8 @@ public abstract class AbstractCommunicationManager implements
private static final RequestHandler APP_RESOURCE_HANDLER = new ApplicationResourceHandler();
+ private static final RequestHandler UNSUPPORTED_BROWSER_HANDLER = new UnsupportedBrowserHandler();
+
/**
* TODO Document me!
*
@@ -187,7 +189,7 @@ public abstract class AbstractCommunicationManager implements
this.application = application;
application.addRequestHandler(getBootstrapHandler());
application.addRequestHandler(APP_RESOURCE_HANDLER);
- application.addRequestHandler(UnsupportedBrowserHandler.getInstance());
+ application.addRequestHandler(UNSUPPORTED_BROWSER_HANDLER);
requireLocale(application.getLocale().toString());
}
diff --git a/src/com/vaadin/terminal/gwt/server/UnsupportedBrowserHandler.java b/src/com/vaadin/terminal/gwt/server/UnsupportedBrowserHandler.java
index 42da74bf65..b27bf11934 100644
--- a/src/com/vaadin/terminal/gwt/server/UnsupportedBrowserHandler.java
+++ b/src/com/vaadin/terminal/gwt/server/UnsupportedBrowserHandler.java
@@ -13,10 +13,10 @@ import com.vaadin.terminal.WrappedResponse;
* use is unsupported. Recognizes Chrome Frame and allow it to be used.
*
* <p>
- * This handler is a usually used as a singleton added to the application by
+ * This handler is usually added to the application by
* {@link AbstractCommunicationManager}. It can be removed/replaced by doing
* something like this: <code><pre>
- * application.removeRequestHandler(UnsupportedBrowserHandler.getInstance());
+ * application.removeRequestHandler(AbstractCommunicationManager.UNSUPPORTED_BROWSER_HANDLER);
* </pre></code>
* </p>
*/
@@ -26,20 +26,6 @@ public class UnsupportedBrowserHandler implements RequestHandler {
/** Cookie used to ignore browser checks */
public static final String FORCE_LOAD_COOKIE = "vaadinforceload=1";
- private static UnsupportedBrowserHandler instance;
-
- /**
- * Get the {@link UnsupportedBrowserHandler} singleton instance.
- *
- * @return the {@link UnsupportedBrowserHandler} singleton
- */
- public static synchronized UnsupportedBrowserHandler getInstance() {
- if (instance == null) {
- instance = new UnsupportedBrowserHandler();
- }
- return instance;
- }
-
@Override
public boolean handleRequest(Application application,
WrappedRequest request, WrappedResponse response)