activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1735087 - in /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x: ./ src/main/csharp/Util/LRUCache.cs
Date Tue, 15 Mar 2016 14:55:05 GMT
Author: tabish
Date: Tue Mar 15 14:55:05 2016
New Revision: 1735087

URL: http://svn.apache.org/viewvc?rev=1735087&view=rev
Log:
Apply fix for problems with LRUCache not properly cleaning up after itself.  
Fixes [AMQNET-AMQNET-521]. (See https://issues.apache.org/jira/browse/AMQNET-AMQNET-521)

Modified:
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/   (props changed)
    activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs

Propchange: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 15 14:55:05 2016
@@ -1,4 +1,4 @@
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.5.x:1082291,1135831,1137081,1171843,1171874,1177390,1177395,1186568,1187123,1238881,1293360,1294890,1295257,1311395,1312026,1374469,1375295,1376782
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.0.0:692591,693525
 /activemq/activemq-dotnet/Apache.NMS.ActiveMQ/tags/1.1.0:788230,788233,790183
-/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517,1695609-1695737,1705945,1715303,1723133
+/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk:1689517,1695609-1695737,1705945,1715303,1723133,1735085

Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs?rev=1735087&r1=1735086&r2=1735087&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs
(original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/branches/1.7.x/src/main/csharp/Util/LRUCache.cs
Tue Mar 15 14:55:05 2016
@@ -47,6 +47,7 @@ namespace Apache.NMS.ActiveMQ.Util
 		public void Clear()
 		{
 			dictionary.Clear();
+            entries.Clear();
 		}
 
         public int Count
@@ -65,12 +66,12 @@ namespace Apache.NMS.ActiveMQ.Util
 			get { return dictionary[key]; }
 			set 
 			{ 
-				TValue currentValue = default (TValue);
+				TValue currentValue;
 				// Moved used item to end of list since it been used again.
 				if (dictionary.TryGetValue(key, out currentValue))
 				{
 					KeyValuePair<TKey, TValue> entry = 
-						new KeyValuePair<TKey, TValue>(key, value);
+                        new KeyValuePair<TKey, TValue>(key, currentValue);
 					entries.Remove(entry);
 				}
 



Mime
View raw message