You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dk...@apache.org on 2011/09/20 02:31:56 UTC
svn commit: r1172920 - in /camel/branches/camel-2.8.x: ./
camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java
Author: dkulp
Date: Tue Sep 20 00:31:56 2011
New Revision: 1172920
URL: http://svn.apache.org/viewvc?rev=1172920&view=rev
Log:
Merged revisions 1164515 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1164515 | davsclaus | 2011-09-02 08:51:57 -0400 (Fri, 02 Sep 2011) | 1 line
CAMEL-4392. Clear cache maps when stopping Camel to avoid leaks
........
Modified:
camel/branches/camel-2.8.x/ (props changed)
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java
Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java?rev=1172920&r1=1172919&r2=1172920&view=diff
==============================================================================
--- camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java (original)
+++ camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/impl/converter/PropertyEditorTypeConverter.java Tue Sep 20 00:31:56 2011
@@ -22,6 +22,7 @@ import java.util.HashMap;
import java.util.Map;
import org.apache.camel.Exchange;
+import org.apache.camel.Service;
import org.apache.camel.TypeConverter;
import org.apache.camel.util.LRUSoftCache;
import org.apache.camel.util.ObjectHelper;
@@ -34,7 +35,7 @@ import org.slf4j.LoggerFactory;
*
* @version
*/
-public class PropertyEditorTypeConverter implements TypeConverter {
+public class PropertyEditorTypeConverter implements TypeConverter, Service {
private static final Logger LOG = LoggerFactory.getLogger(PropertyEditorTypeConverter.class);
// use a soft bound cache to avoid using too much memory in case a lot of different classes
@@ -113,4 +114,15 @@ public class PropertyEditorTypeConverter
public <T> T mandatoryConvertTo(Class<T> type, Exchange exchange, Object value) {
return convertTo(type, value);
}
+
+ public void start() throws Exception {
+ // noop
+ }
+
+ public void stop() throws Exception {
+ // clear caches so we dont leak
+ cache.clear();
+ misses.clear();
+ }
+
}