diff options
author | Leif Åstrand <leif@vaadin.com> | 2013-04-02 11:17:11 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-04-02 10:26:40 +0000 |
commit | dd157ae121433673c85c3c10b013af404fe2204b (patch) | |
tree | bf813d530ffe5b17f125040475aa3534546ee151 /server | |
parent | cbd3badb929e0253a44ae19464b6dd0caebca968 (diff) | |
download | vaadin-framework-dd157ae121433673c85c3c10b013af404fe2204b.tar.gz vaadin-framework-dd157ae121433673c85c3c10b013af404fe2204b.zip |
Use updated CurrentInstance API (#9945)
Change-Id: I6576c4be4d6c909ce95e8b48904529477ae755f9
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/ConnectorResourceHandler.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/src/com/vaadin/server/ConnectorResourceHandler.java b/server/src/com/vaadin/server/ConnectorResourceHandler.java index 61631c3d23..12c6df6ffa 100644 --- a/server/src/com/vaadin/server/ConnectorResourceHandler.java +++ b/server/src/com/vaadin/server/ConnectorResourceHandler.java @@ -16,7 +16,6 @@ package com.vaadin.server; import java.io.IOException; -import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; @@ -76,8 +75,8 @@ public class ConnectorResourceHandler implements RequestHandler { session.unlock(); } - Map<Class<?>, Object> oldThreadLocals = new HashMap<Class<?>, Object>(); - CurrentInstance.setThreadLocals(ui, oldThreadLocals); + Map<Class<?>, CurrentInstance> oldThreadLocals = CurrentInstance + .setThreadLocals(ui); try { if (!connector.handleConnectorRequest(request, response, key)) { return error(request, response, @@ -87,7 +86,7 @@ public class ConnectorResourceHandler implements RequestHandler { + key); } } finally { - CurrentInstance.setThreadLocals(oldThreadLocals); + CurrentInstance.restoreThreadLocals(oldThreadLocals); } return true; |