harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r995061 - /harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java
Date Wed, 08 Sep 2010 13:59:05 GMT
Author: odeakin
Date: Wed Sep  8 13:59:04 2010
New Revision: 995061

URL: http://svn.apache.org/viewvc?rev=995061&view=rev
Log:
Fix logic so we only remove elements from the cache if there are more than can be held in
the new cache size.

Modified:
    harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java

Modified: harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java?rev=995061&r1=995060&r2=995061&view=diff
==============================================================================
--- harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java
(original)
+++ harmony/enhanced/java/branches/omd/classlib/modules/x-net/src/main/java/org/apache/harmony/xnet/provider/jsse/SSLSessionContextImpl.java
Wed Sep  8 13:59:04 2010
@@ -84,9 +84,9 @@ public class SSLSessionContextImpl imple
             throw new IllegalArgumentException("size < 0");
         }
         cacheSize = size;
-        if (size > 0 && sessions.size() < size) {
+        if (size > 0 && sessions.size() > size) {
             // remove size-sessions.size() oldest sessions
-            removeOldest(size - sessions.size());
+            removeOldest(sessions.size() - size);
         }
 
     }



Mime
View raw message