myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gcrawf...@apache.org
Subject svn commit: r1067001 - /myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
Date Thu, 03 Feb 2011 22:07:38 GMT
Author: gcrawford
Date: Thu Feb  3 22:07:38 2011
New Revision: 1067001

URL: http://svn.apache.org/viewvc?rev=1067001&view=rev
Log:
TRINIDAD-1989 Defltaer/inflater from StateManagerImpl holds onto memory

Modified:
    myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java

Modified: myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java?rev=1067001&r1=1067000&r2=1067001&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
(original)
+++ myfaces/trinidad/branches/1.2.12.3.3-branch/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/application/StateManagerImpl.java
Thu Feb  3 22:07:38 2011
@@ -326,7 +326,7 @@ public class StateManagerImpl extends St
       if (applicationViewCache == null)
       {
         assert(!dontSave);
-        
+
         RequestContext trinContext = RequestContext.getCurrentInstance();
 
         TokenCache cache = _getViewCache(trinContext, extContext);
@@ -773,7 +773,7 @@ public class StateManagerImpl extends St
   private TokenCache _getViewCache(RequestContext trinContext, ExternalContext extContext)
   {
     String cacheKey = _getViewCacheKey(extContext, trinContext, null);
-    
+
     return TokenCache.getTokenCacheFromSession(extContext,cacheKey, true,_getCacheSize(extContext));
   }
 
@@ -1420,6 +1420,7 @@ public class StateManagerImpl extends St
         if(decompressor != null)
         {
           decompressor.reset();
+          decompressor.setInput(_EMPTY);
           TransientHolder<Inflater> th = TransientHolder.newTransientHolder(decompressor);
           sessionMap.put("PAGE_STATE_INFLATER", th);
         }
@@ -1481,6 +1482,7 @@ public class StateManagerImpl extends St
         if(compresser != null)
         {
           compresser.reset();
+          compresser.setInput(_EMPTY);
           TransientHolder<Deflater> th = TransientHolder.newTransientHolder(compresser);
           sessionMap.put("PAGE_STATE_DEFLATER", th);
         }
@@ -1548,5 +1550,7 @@ public class StateManagerImpl extends St
 
   private static final long serialVersionUID = 1L;
 
+  private static final byte[] _EMPTY = new byte[0];
+
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(StateManagerImpl.class);
 }



Mime
View raw message