cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r169856 - /cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java
Date Thu, 12 May 2005 17:50:21 GMT
Author: joerg
Date: Thu May 12 10:50:20 2005
New Revision: 169856

URL: http://svn.apache.org/viewcvs?rev=169856&view=rev
Log:
fixed weak referencing (thanks to Alfred Nathaniel)

Modified:
    cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java

Modified: cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java
URL: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java?rev=169856&r1=169855&r2=169856&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/java/org/apache/cocoon/environment/http/HttpRequest.java
Thu May 12 10:50:20 2005
@@ -230,11 +230,11 @@
             // synch on server session assures only one wrapper per session 
             synchronized (serverSession) {
                 // retrieve existing wrapper
-                session = (HttpSession)sessions.get(serverSession);
+                session = (HttpSession)((WeakReference)sessions.get(serverSession)).get();
                 if (session == null) {
                     // create new wrapper
                     session = new HttpSession(serverSession);
-                    sessions.put(serverSession, session);
+                    sessions.put(serverSession, new WeakReference(session));
                 }
             }
         } else {



Mime
View raw message