Author: dkulp Date: Fri Jul 8 19:34:37 2011 New Revision: 1144441 URL: http://svn.apache.org/viewvc?rev=1144441&view=rev Log: Merged revisions 1090204 via svnmerge from https://svn.apache.org/repos/asf/camel/trunk
........ r1090204 | davsclaus | 2011-04-08 07:25:37 -0400 (Fri, 08 Apr 2011) | 1 line CAMEL-3847: Adding new type converter should remove it from misses cache. ........ Added: camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryMissesThenAddTest.java - copied unchanged from r1090204, camel/trunk/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryMissesThenAddTest.java Modified: camel/branches/camel-2.7.x/ (props changed) camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java Propchange: camel/branches/camel-2.7.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Jul 8 19:34:37 2011 @@ -1 +1 @@ -/camel/trunk:1083696,1083723-1083724,1084150,1085277,1085543,1085549,1085905,1085909,1086165,1086231,1087005,1087276,1087612,1087620,1087856,1088583,1088916-1088917,1089275,1089348,1090166,1090564,1090960-1090969,1091082,1091518,1091771,1091799,1092068,1092577,1092667,1093978,1094147,1094156,1095405,1095469,1095471,1095475-1095476,1096346,1097909,1097912,1097978,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925,1144248,1144324 +/camel/trunk:1083696,1083723-1083724,1084150,1085277,1085543,1085549,1085905,1085909,1086165,1086231,1087005,1087276,1087612,1087620,1087856,1088583,1088916-1088917,1089275,1089348,1090166,1090204,1090564,1090960-1090969,1091082,1091518,1091771,1091799,1092068,1092577,1092667,1093978,1094147,1094156,1095405,1095469,1095471,1095475-1095476,1096346,1097909,1097912,1097978,1098630,1099417,1100975,1102162,1102181,1104076,1124497,1127744,1127988,1131411,1134252,1134501,1135223,1135364,1136290,1138285,1139163,1140096-1140102,1141783,1143925,1144248,1144324 Propchange: camel/branches/camel-2.7.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java?rev=1144441&r1=1144440&r2=1144441&view=diff ============================================================================== --- camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java (original) +++ camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java Fri Jul 8 19:34:37 2011 @@ -225,9 +225,7 @@ public abstract class BaseTypeConverterR } // Could not find suitable conversion, so remember it - synchronized (misses) { - misses.put(key, key); - } + misses.put(key, key); // Could not find suitable conversion, so return Void to indicate not found return Void.TYPE; @@ -247,6 +245,8 @@ public abstract class BaseTypeConverterR log.warn("Overriding type converter from: " + converter + " to: " + typeConverter); } typeMappings.put(key, typeConverter); + // remove any previous misses, as we added the new type converter + misses.remove(key); } } } Modified: camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java?rev=1144441&r1=1144440&r2=1144441&view=diff ============================================================================== --- camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java (original) +++ camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/impl/TypeConverterRegistryTest.java Fri Jul 8 19:34:37 2011 @@ -77,8 +77,8 @@ public class TypeConverterRegistryTest e } public <T> T convertTo(Class<T> type, Exchange exchange, Object value) { - // this method with the Exchange parameter will be preferd by Camel to invoke - // this allows you to fetch information from the exchange during convertions + // this method with the Exchange parameter will be preferred by Camel to invoke + // this allows you to fetch information from the exchange during conversions // such as an encoding parameter or the likes return convertTo(type, value); }