Do not call String.valueOf(String).

This will "save us" only if the value is null.
But it is not Wicket' job to decide what keys and/or values an application can 
store in the ISessionStore.


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/b30b7a2e
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/b30b7a2e
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/b30b7a2e

Branch: refs/heads/master
Commit: b30b7a2e18db00752b7d043e77d1be1599fee4e9
Parents: 7054ccc
Author: Martin Tzvetanov Grigorov <[email protected]>
Authored: Tue Mar 18 17:59:16 2014 +0200
Committer: Martin Tzvetanov Grigorov <[email protected]>
Committed: Tue Mar 18 17:59:16 2014 +0200

----------------------------------------------------------------------
 wicket-core/src/main/java/org/apache/wicket/Session.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/b30b7a2e/wicket-core/src/main/java/org/apache/wicket/Session.java
----------------------------------------------------------------------
diff --git a/wicket-core/src/main/java/org/apache/wicket/Session.java 
b/wicket-core/src/main/java/org/apache/wicket/Session.java
index 147351b..4b55b73 100644
--- a/wicket-core/src/main/java/org/apache/wicket/Session.java
+++ b/wicket-core/src/main/java/org/apache/wicket/Session.java
@@ -272,7 +272,7 @@ public abstract class Session implements IClusterable, 
IEventSink
                        {
                                for (Map.Entry<String, Serializable> entry : 
temporarySessionAttributes.entrySet())
                                {
-                                       store.setAttribute(request, 
String.valueOf(entry.getKey()), entry.getValue());
+                                       store.setAttribute(request, 
entry.getKey(), entry.getValue());
                                }
                                temporarySessionAttributes = null;
                        }

Reply via email to