struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r491550 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
Date Mon, 01 Jan 2007 09:18:33 GMT
Author: mrdon
Date: Mon Jan  1 01:18:30 2007
New Revision: 491550

URL: http://svn.apache.org/viewvc?view=rev&rev=491550
Log:
Temporary fix for threadlocal cleanup on request context impl,
in lieu of Bob's proper resolution
WW-1543

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java?view=diff&rev=491550&r1=491549&r2=491550
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
(original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
Mon Jan  1 01:18:30 2007
@@ -150,7 +150,7 @@
         return proceed;
     }
 
-    static ThreadLocal<RequestContextImpl[]> threadLocalRequestContext = new ThreadLocal<RequestContextImpl[]>()
{
+    static ThreadLocal<Object[]> threadLocalRequestContext = new ThreadLocal<Object[]>()
{
         protected RequestContextImpl[] initialValue() {
             return new RequestContextImpl[1];
         }
@@ -162,7 +162,7 @@
      */
     public static String callInContext(ActionInvocation invocation, Callable<String>
callable)
             throws Exception {
-        RequestContextImpl[] reference = threadLocalRequestContext.get();
+        RequestContextImpl[] reference = (RequestContextImpl[])threadLocalRequestContext.get();
 
         if (reference[0] == null) {
             // Initial invocation.
@@ -187,7 +187,7 @@
     }
 
     public static RequestContextImpl get() {
-        RequestContextImpl requestContext = threadLocalRequestContext.get()[0];
+        RequestContextImpl requestContext = ((RequestContextImpl[])threadLocalRequestContext.get())[0];
 
         if (requestContext == null)
             throw new IllegalStateException("RequestContext has not been created.");



Mime
View raw message