Browse files

[maven-release-plugin] copy for tag camel-2.9.1

git-svn-id: https://svn.apache.org/repos/asf/camel/tags/camel-2.9.1@1295649 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
2 parents ba80a9c + d8afb78 commit 08266bb3ff3ae795a03ccd5db89fccc887fa3d89 @hzbarcea hzbarcea committed Mar 1, 2012
Showing with 1,233 additions and 4,239 deletions.
  1. +1 −41 apache-camel/pom.xml
  2. +1 −11 apache-camel/src/main/descriptors/common-bin.xml
  3. +2 −2 buildingtools/pom.xml
  4. +1 −1 camel-core/pom.xml
  5. +7 −19 camel-core/src/main/java/org/apache/camel/CamelContext.java
  6. +1 −4 camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
  7. +0 −1 camel-core/src/main/java/org/apache/camel/Exchange.java
  8. +0 −29 camel-core/src/main/java/org/apache/camel/Rejectable.java
  9. +6 −49 camel-core/src/main/java/org/apache/camel/ThreadPoolRejectedPolicy.java
  10. +0 −3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
  11. +0 −3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
  12. +0 −3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
  13. +4 −4 camel-core/src/main/java/org/apache/camel/builder/AdviceWithBuilder.java
  14. +5 −5 camel-core/src/main/java/org/apache/camel/builder/AdviceWithRouteBuilder.java
  15. +51 −50 camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
  16. +1 −1 camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
  17. +1 −20 camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
  18. +12 −25 camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
  19. +1 −1 camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java
  20. +4 −2 camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java
  21. +1 −1 camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
  22. +3 −17 camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java
  23. +6 −4 camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
  24. +21 −28 camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
  25. +1 −1 camel-core/src/main/java/org/apache/camel/component/bean/BeanConverter.java
  26. +2 −1 camel-core/src/main/java/org/apache/camel/component/bean/BeanInfo.java
  27. +2 −1 camel-core/src/main/java/org/apache/camel/component/bean/ClassComponent.java
  28. +1 −2 camel-core/src/main/java/org/apache/camel/component/bean/MethodInfo.java
  29. +1 −0 camel-core/src/main/java/org/apache/camel/component/bean/MethodNotFoundException.java
  30. +14 −45 camel-core/src/main/java/org/apache/camel/component/bean/ProxyHelper.java
  31. +1 −1 camel-core/src/main/java/org/apache/camel/component/direct/DirectConsumer.java
  32. +65 −18 camel-core/src/main/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilter.java
  33. +55 −8 camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
  34. +0 −19 camel-core/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
  35. +5 −3 camel-core/src/main/java/org/apache/camel/component/mock/MockEndpoint.java
  36. +22 −26 camel-core/src/main/java/org/apache/camel/component/properties/DefaultPropertiesResolver.java
  37. +2 −16 camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java
  38. +3 −4 camel-core/src/main/java/org/apache/camel/component/properties/PropertiesResolver.java
  39. +1 −2 camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
  40. +9 −3 camel-core/src/main/java/org/apache/camel/component/validator/DefaultLSResourceResolver.java
  41. +1 −1 camel-core/src/main/java/org/apache/camel/component/validator/ValidatorComponent.java
  42. +3 −3 camel-core/src/main/java/org/apache/camel/impl/BreakpointSupport.java
  43. +3 −2 camel-core/src/main/java/org/apache/camel/impl/CompositeRegistry.java
  44. +1 −1 camel-core/src/main/java/org/apache/camel/impl/ConditionSupport.java
  45. +0 −219 camel-core/src/main/java/org/apache/camel/impl/DefaultCamelBeanPostProcessor.java
  46. +10 −23 camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContext.java
  47. +0 −7 camel-core/src/main/java/org/apache/camel/impl/DefaultCamelContextNameStrategy.java
  48. +2 −1 camel-core/src/main/java/org/apache/camel/impl/DefaultComponentResolver.java
  49. +9 −9 camel-core/src/main/java/org/apache/camel/impl/DefaultDebugger.java
  50. +4 −4 camel-core/src/main/java/org/apache/camel/impl/DefaultExchangeHolder.java
  51. +14 −25 camel-core/src/main/java/org/apache/camel/impl/DefaultExecutorServiceManager.java
  52. +1 −1 camel-core/src/main/java/org/apache/camel/impl/DefaultInflightRepository.java
  53. +4 −2 camel-core/src/main/java/org/apache/camel/impl/DefaultLanguageResolver.java
  54. +0 −166 camel-core/src/main/java/org/apache/camel/impl/DefaultManagementNameStrategy.java
  55. +9 −5 camel-core/src/main/java/org/apache/camel/impl/DefaultPackageScanClassResolver.java
  56. +0 −11 camel-core/src/main/java/org/apache/camel/impl/DefaultRouteStartupOrder.java
  57. +3 −84 camel-core/src/main/java/org/apache/camel/impl/DefaultShutdownStrategy.java
  58. +2 −4 camel-core/src/main/java/org/apache/camel/impl/DefaultThreadPoolFactory.java
  59. +1 −1 camel-core/src/main/java/org/apache/camel/impl/DefaultUnitOfWork.java
  60. +1 −1 camel-core/src/main/java/org/apache/camel/impl/EventDrivenConsumerRoute.java
  61. +0 −11 camel-core/src/main/java/org/apache/camel/impl/ExplicitCamelContextNameStrategy.java
  62. +2 −1 camel-core/src/main/java/org/apache/camel/impl/GzipDataFormat.java
  63. +1 −11 camel-core/src/main/java/org/apache/camel/impl/InterceptSendToEndpoint.java
  64. +4 −2 camel-core/src/main/java/org/apache/camel/impl/JndiRegistry.java
  65. +25 −4 camel-core/src/main/java/org/apache/camel/impl/RouteService.java
  66. +0 −115 camel-core/src/main/java/org/apache/camel/impl/ScheduledBatchPollingConsumer.java
  67. +3 −3 camel-core/src/main/java/org/apache/camel/impl/ZipDataFormat.java
  68. +2 −2 camel-core/src/main/java/org/apache/camel/impl/converter/AnnotationTypeConverterLoader.java
  69. +21 −4 camel-core/src/main/java/org/apache/camel/impl/converter/BaseTypeConverterRegistry.java
  70. +0 −1 camel-core/src/main/java/org/apache/camel/impl/converter/CoreTypeConverterLoader.java
  71. +0 −3 camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
  72. +1 −3 camel-core/src/main/java/org/apache/camel/impl/converter/LazyLoadingTypeConverter.java
  73. +11 −6 camel-core/src/main/java/org/apache/camel/impl/osgi/tracker/AbstractTracked.java
  74. +1 −1 camel-core/src/main/java/org/apache/camel/impl/scan/InvertingPackageScanFilter.java
  75. +2 −2 camel-core/src/main/java/org/apache/camel/language/bean/BeanExpression.java
  76. +2 −1 camel-core/src/main/java/org/apache/camel/language/bean/BeanLanguage.java
  77. +0 −2 camel-core/src/main/java/org/apache/camel/language/simple/ast/SimpleFunctionExpression.java
  78. +1 −1 camel-core/src/main/java/org/apache/camel/main/MainSupport.java
  79. +1 −1 camel-core/src/main/java/org/apache/camel/management/DefaultManagementAgent.java
  80. +46 −65 camel-core/src/main/java/org/apache/camel/management/DefaultManagementLifecycleStrategy.java
  81. +8 −9 camel-core/src/main/java/org/apache/camel/management/DefaultManagementNamingStrategy.java
  82. +1 −1 camel-core/src/main/java/org/apache/camel/management/DefaultManagementObjectStrategy.java
  83. +7 −7 camel-core/src/main/java/org/apache/camel/management/InstrumentationInterceptStrategy.java
  84. +3 −3 camel-core/src/main/java/org/apache/camel/management/ManagementStrategyFactory.java
  85. +7 −4 camel-core/src/main/java/org/apache/camel/management/mbean/JMXNotificationTraceEventHandler.java
  86. +10 −20 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedBrowsableEndpoint.java
  87. +0 −59 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
  88. +1 −7 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedEndpoint.java
  89. +0 −43 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedPerformanceCounter.java
  90. +0 −37 camel-core/src/main/java/org/apache/camel/management/mbean/ManagedRoute.java
  91. +1 −1 camel-core/src/main/java/org/apache/camel/model/AOPDefinition.java
  92. +5 −6 camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
  93. +1 −1 camel-core/src/main/java/org/apache/camel/model/Block.java
  94. +16 −16 camel-core/src/main/java/org/apache/camel/model/CatchDefinition.java
  95. +11 −11 camel-core/src/main/java/org/apache/camel/model/ChoiceDefinition.java
  96. +2 −2 camel-core/src/main/java/org/apache/camel/model/DynamicRouterDefinition.java
  97. +1 −1 camel-core/src/main/java/org/apache/camel/model/ExecutorServiceAwareDefinition.java
  98. +6 −24 camel-core/src/main/java/org/apache/camel/model/ExpressionNode.java
  99. +2 −1 camel-core/src/main/java/org/apache/camel/model/FilterDefinition.java
  100. +1 −1 camel-core/src/main/java/org/apache/camel/model/FinallyDefinition.java
  101. +4 −4 camel-core/src/main/java/org/apache/camel/model/InterceptDefinition.java
  102. +1 −1 camel-core/src/main/java/org/apache/camel/model/InterceptFromDefinition.java
  103. +9 −23 camel-core/src/main/java/org/apache/camel/model/InterceptSendToEndpointDefinition.java
  104. +6 −8 camel-core/src/main/java/org/apache/camel/model/LoadBalanceDefinition.java
  105. +2 −1 camel-core/src/main/java/org/apache/camel/model/LoadBalancerDefinition.java
  106. +2 −2 camel-core/src/main/java/org/apache/camel/model/LogDefinition.java
  107. +0 −4 camel-core/src/main/java/org/apache/camel/model/MarshalDefinition.java
  108. +3 −2 camel-core/src/main/java/org/apache/camel/model/NoOutputDefinition.java
  109. +4 −3 camel-core/src/main/java/org/apache/camel/model/NoOutputExpressionNode.java
  110. +9 −7 camel-core/src/main/java/org/apache/camel/model/OnCompletionDefinition.java
  111. +18 −17 camel-core/src/main/java/org/apache/camel/model/OnExceptionDefinition.java
  112. +2 −2 camel-core/src/main/java/org/apache/camel/model/OtherwiseDefinition.java
  113. +3 −3 camel-core/src/main/java/org/apache/camel/model/OutputDefinition.java
  114. +42 −42 camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java
  115. +11 −12 camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java
  116. +1 −1 camel-core/src/main/java/org/apache/camel/model/RecipientListDefinition.java
  117. +3 −3 camel-core/src/main/java/org/apache/camel/model/ResequenceDefinition.java
  118. +1 −1 camel-core/src/main/java/org/apache/camel/model/RouteContextRefDefinition.java
  119. +7 −6 camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java
  120. +16 −13 camel-core/src/main/java/org/apache/camel/model/RouteDefinitionHelper.java
  121. +1 −1 camel-core/src/main/java/org/apache/camel/model/RoutesDefinition.java
  122. +2 −2 camel-core/src/main/java/org/apache/camel/model/RoutingSlipDefinition.java
  123. +10 −10 camel-core/src/main/java/org/apache/camel/model/SortDefinition.java
  124. +1 −1 camel-core/src/main/java/org/apache/camel/model/ThreadPoolProfileDefinition.java
  125. +0 −1 camel-core/src/main/java/org/apache/camel/model/ThreadsDefinition.java
  126. +5 −4 camel-core/src/main/java/org/apache/camel/model/TransactedDefinition.java
  127. +9 −22 camel-core/src/main/java/org/apache/camel/model/TryDefinition.java
  128. +0 −4 camel-core/src/main/java/org/apache/camel/model/UnmarshalDefinition.java
  129. +1 −1 camel-core/src/main/java/org/apache/camel/model/WhenDefinition.java
  130. +0 −48 camel-core/src/main/java/org/apache/camel/model/WhenSkipSendToEndpointDefinition.java
  131. +2 −2 camel-core/src/main/java/org/apache/camel/model/WireTapDefinition.java
  132. +0 −74 camel-core/src/main/java/org/apache/camel/model/dataformat/AvroDataFormat.java
  133. +0 −119 camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java
  134. +0 −2 camel-core/src/main/java/org/apache/camel/model/dataformat/DataFormatsDefinition.java
  135. +3 −3 camel-core/src/main/java/org/apache/camel/model/dataformat/JibxDataFormat.java
  136. +1 −3 camel-core/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
  137. +1 −1 camel-core/src/main/java/org/apache/camel/model/dataformat/JsonLibrary.java
  138. +12 −12 camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
  139. +3 −3 camel-core/src/main/java/org/apache/camel/processor/CatchProcessor.java
  140. +1 −1 camel-core/src/main/java/org/apache/camel/processor/DynamicRouter.java
  141. +2 −2 camel-core/src/main/java/org/apache/camel/processor/ErrorHandlerSupport.java
  142. +4 −4 camel-core/src/main/java/org/apache/camel/processor/MulticastProcessor.java
  143. +5 −5 camel-core/src/main/java/org/apache/camel/processor/SortProcessor.java
  144. +6 −5 camel-core/src/main/java/org/apache/camel/processor/Splitter.java
  145. +10 −64 camel-core/src/main/java/org/apache/camel/processor/ThreadsProcessor.java
  146. +15 −49 camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregateProcessor.java
  147. +5 −5 camel-core/src/main/java/org/apache/camel/processor/exceptionpolicy/ExceptionPolicyKey.java
  148. +2 −1 camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultChannel.java
  149. +3 −3 camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceEventHandler.java
  150. +1 −1 camel-core/src/main/java/org/apache/camel/processor/interceptor/DefaultTraceInterceptorFactory.java
  151. +3 −3 camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceEventHandler.java
  152. +1 −1 camel-core/src/main/java/org/apache/camel/processor/interceptor/TraceInterceptorFactory.java
  153. +19 −34 camel-core/src/main/java/org/apache/camel/processor/loadbalancer/WeightedRandomLoadBalancer.java
  154. +1 −1 camel-core/src/main/java/org/apache/camel/processor/resequencer/DefaultExchangeComparator.java
  155. +3 −3 camel-core/src/main/java/org/apache/camel/spi/Breakpoint.java
  156. +1 −26 camel-core/src/main/java/org/apache/camel/spi/CamelContextNameStrategy.java
  157. +1 −1 camel-core/src/main/java/org/apache/camel/spi/Condition.java
  158. +2 −2 camel-core/src/main/java/org/apache/camel/spi/Debugger.java
  159. +5 −5 camel-core/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java
  160. +5 −5 camel-core/src/main/java/org/apache/camel/spi/ExecutorServiceStrategy.java
  161. +0 −8 camel-core/src/main/java/org/apache/camel/spi/LifecycleStrategy.java
  162. +0 −80 camel-core/src/main/java/org/apache/camel/spi/ManagementNameStrategy.java
  163. +1 −1 camel-core/src/main/java/org/apache/camel/spi/ManagementNamingStrategy.java
  164. +1 −1 camel-core/src/main/java/org/apache/camel/spi/ManagementObjectStrategy.java
  165. +0 −8 camel-core/src/main/java/org/apache/camel/spi/RouteStartupOrder.java
  166. +7 −1 camel-core/src/main/java/org/apache/camel/spi/ShutdownAware.java
  167. +0 −49 camel-core/src/main/java/org/apache/camel/spi/ShutdownPrepared.java
  168. +2 −1 camel-core/src/main/java/org/apache/camel/support/ChildServiceSupport.java
  169. +1 −1 camel-core/src/main/java/org/apache/camel/support/DefaultTimeoutMap.java
  170. +1 −1 camel-core/src/main/java/org/apache/camel/support/TimeoutMapEntry.java
  171. +1 −1 camel-core/src/main/java/org/apache/camel/support/TimerListenerManager.java
  172. +2 −2 camel-core/src/main/java/org/apache/camel/support/TokenPairExpressionIterator.java
  173. +1 −1 camel-core/src/main/java/org/apache/camel/support/TokenXMLPairExpressionIterator.java
  174. +4 −4 camel-core/src/main/java/org/apache/camel/util/CollectionHelper.java
  175. +1 −1 camel-core/src/main/java/org/apache/camel/util/EndpointHelper.java
  176. +2 −12 camel-core/src/main/java/org/apache/camel/util/IOHelper.java
  177. +6 −4 camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
  178. +1 −1 camel-core/src/main/java/org/apache/camel/util/OrderedComparator.java
  179. +0 −125 camel-core/src/main/java/org/apache/camel/util/ReflectionHelper.java
  180. +0 −30 camel-core/src/main/java/org/apache/camel/util/ServiceHelper.java
  181. +5 −4 camel-core/src/main/java/org/apache/camel/util/URISupport.java
  182. +1 −0 camel-core/src/main/java/org/apache/camel/util/UnitOfWorkHelper.java
  183. +1 −1 camel-core/src/main/java/org/apache/camel/util/ValueHolder.java
  184. +0 −50 camel-core/src/main/java/org/apache/camel/util/concurrent/RejectableFutureTask.java
  185. +0 −81 camel-core/src/main/java/org/apache/camel/util/concurrent/RejectableScheduledThreadPoolExecutor.java
  186. +0 −87 camel-core/src/main/java/org/apache/camel/util/concurrent/RejectableThreadPoolExecutor.java
  187. +6 −3 camel-core/src/main/java/org/apache/camel/util/concurrent/SubmitOrderedCompletionService.java
  188. +16 −18 camel-core/src/main/java/org/apache/camel/util/concurrent/ThreadHelper.java
  189. +2 −2 camel-core/src/main/java/org/apache/camel/util/jndi/JndiContext.java
  190. +2 −2 camel-core/src/main/java/org/apache/camel/view/GraphSupport.java
  191. +4 −3 camel-core/src/main/java/org/apache/camel/view/NodeData.java
  192. +6 −5 camel-core/src/main/java/org/apache/camel/view/RouteDotGenerator.java
  193. +6 −5 camel-core/src/main/java/org/apache/camel/view/XmlGraphGenerator.java
  194. +3 −6 camel-core/src/main/resources/META-INF/services/org/apache/camel/TypeConverter
  195. +0 −2 camel-core/src/main/resources/org/apache/camel/model/dataformat/jaxb.index
  196. +4 −4 camel-core/src/test/java/org/apache/camel/ContextTestSupport.java
  197. +0 −1 camel-core/src/test/java/org/apache/camel/builder/ExceptionBuilderTest.java
  198. +4 −0 camel-core/src/test/java/org/apache/camel/builder/ExpressionClauseTest.java
  199. +2 −2 camel-core/src/test/java/org/apache/camel/builder/RouteBuilderTest.java
  200. +8 −8 camel-core/src/test/java/org/apache/camel/builder/xml/XPathTransformTest.java
  201. +1 −1 camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterInvalidValueTest.java
  202. +1 −1 camel-core/src/test/java/org/apache/camel/component/bean/BeanParameterValueTest.java
  203. +5 −5 ...c/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersAndBodyInjectionTest.java
  204. +5 −5 ...core/src/test/java/org/apache/camel/component/bean/BeanWithPropertiesAndHeadersInjectionTest.java
  205. +0 −1 camel-core/src/test/java/org/apache/camel/component/bean/MyApplicationException.java
  206. +0 −2 camel-core/src/test/java/org/apache/camel/component/bean/MyCustomException.java
  207. +1 −1 camel-core/src/test/java/org/apache/camel/component/bean/OrderServiceBean.java
  208. +1 −1 camel-core/src/test/java/org/apache/camel/component/bean/ProxyReturnFutureExceptionTest.java
  209. +3 −3 camel-core/src/test/java/org/apache/camel/component/bean/ProxyReturnFutureTest.java
  210. +0 −112 camel-core/src/test/java/org/apache/camel/component/file/AntPathMatcherGenericFileFilterTest.java
  211. +3 −3 camel-core/src/test/java/org/apache/camel/component/file/FileConsumerFileFilterTest.java
  212. +2 −2 camel-core/src/test/java/org/apache/camel/component/file/FileProduceTempFileNameTest.java
  213. +3 −3 camel-core/src/test/java/org/apache/camel/component/file/FileProduceTempPrefixTest.java
  214. +3 −3 camel-core/src/test/java/org/apache/camel/component/file/FileSorterRefTest.java
  215. +0 −75 camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameDeleteTest.java
  216. +0 −4 camel-core/src/test/java/org/apache/camel/component/file/FilerConsumerDoneFileNameTest.java
  217. +8 −8 .../src/test/java/org/apache/camel/component/file/strategy/GenericFileDeleteProcessStrategyTest.java
  218. +0 −43 camel-core/src/test/java/org/apache/camel/component/properties/PropertiesComponentDefaultTest.java
  219. +1 −1 camel-core/src/test/java/org/apache/camel/component/properties/PropertiesResolverTest.java
  220. +1 −1 camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentTest.java
  221. +1 −1 camel-core/src/test/java/org/apache/camel/component/seda/SedaWaitForTaskNewerOnCompletionTest.java
  222. +1 −1 camel-core/src/test/java/org/apache/camel/impl/CamelContextAddRouteDefinitionsFromXmlTest.java
  223. +3 −3 camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
  224. +0 −3 camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextLazyLoadTypeConvertersTest.java
  225. +0 −4 ...core/src/test/java/org/apache/camel/impl/DefaultCamelContextWithLifecycleStrategyRestartTest.java
  226. +4 −4 camel-core/src/test/java/org/apache/camel/impl/DefaultClassResolverTest.java
  227. +4 −2 camel-core/src/test/java/org/apache/camel/impl/DefaultExchangeHolderTest.java
  228. +13 −13 camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceManagerTest.java
  229. +12 −13 camel-core/src/test/java/org/apache/camel/impl/DefaultExecutorServiceStrategyTest.java
  230. +0 −4 camel-core/src/test/java/org/apache/camel/impl/DummyLifecycleStrategy.java
  231. +1 −1 camel-core/src/test/java/org/apache/camel/impl/MultipleLifecycleStrategyTest.java
  232. +0 −1 camel-core/src/test/java/org/apache/camel/impl/MySerialBean.java
  233. +4 −9 camel-core/src/test/java/org/apache/camel/impl/PendingExchangesShutdownGracefulTest.java
  234. +8 −12 camel-core/src/test/java/org/apache/camel/impl/PendingExchangesTwoRouteShutdownGracefulTest.java
  235. +2 −2 camel-core/src/test/java/org/apache/camel/impl/RegistryTest.java
  236. +8 −8 camel-core/src/test/java/org/apache/camel/impl/ServicePoolTest.java
  237. +2 −2 camel-core/src/test/java/org/apache/camel/impl/SimpleRegistryTest.java
  238. +0 −4 camel-core/src/test/java/org/apache/camel/impl/VetoCamelContextStartTest.java
  239. +21 −33 camel-core/src/test/java/org/apache/camel/impl/ZipDataFormatTest.java
  240. +2 −1 camel-core/src/test/java/org/apache/camel/issues/ChangeHeaderCaseIssueTest.java
  241. +0 −2 camel-core/src/test/java/org/apache/camel/issues/ExceptionPolicyIssueTest.java
  242. +1 −1 camel-core/src/test/java/org/apache/camel/issues/SplitterParallelIssueTest.java
  243. +1 −1 camel-core/src/test/java/org/apache/camel/issues/SplitterUsingBeanReturningMessageTest.java
  244. +0 −86 camel-core/src/test/java/org/apache/camel/issues/StopCamelFromRouteTest.java
  245. +0 −107 camel-core/src/test/java/org/apache/camel/issues/StopRouteFromRouteTest.java
  246. +1 −1 camel-core/src/test/java/org/apache/camel/issues/TwoTimerWithJMXIssue.java
  247. +3 −9 camel-core/src/test/java/org/apache/camel/issues/TypeConverterConcurrencyIssueTest.java
  248. +2 −2 camel-core/src/test/java/org/apache/camel/language/BeanLanguageInvalidOGNLTest.java
  249. +5 −3 camel-core/src/test/java/org/apache/camel/language/SimpleOgnlMapIssueTest.java
  250. +23 −23 camel-core/src/test/java/org/apache/camel/language/TokenizerTest.java
  251. +4 −8 camel-core/src/test/java/org/apache/camel/language/simple/SimpleTest.java
  252. +2 −2 ...est/java/org/apache/camel/management/JmxInstrumentationOnlyRegisterProcessorWithCustomIdTest.java
  253. +2 −1 camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingDefaultsTest.java
  254. +1 −1 camel-core/src/test/java/org/apache/camel/management/JmxInstrumentationUsingPlatformMBSTest.java
  255. +1 −5 camel-core/src/test/java/org/apache/camel/management/JmxNotificationEventNotifierTest.java
  256. +1 −1 ...mel/management/{ManagedBrowsableEndpointAsXmlTest.java → ManagedBrowseableEndpointAsXmlTest.java}
  257. +1 −1 ...mel/management/{ManagedBrowsableEndpointEmptyTest.java → ManagedBrowseableEndpointEmptyTest.java}
  258. +1 −1 .../apache/camel/management/{ManagedBrowsableEndpointTest.java → ManagedBrowseableEndpointTest.java}
  259. +0 −70 camel-core/src/test/java/org/apache/camel/management/ManagedCamelContextDumpStatsAsXmlTest.java
  260. +0 −55 camel-core/src/test/java/org/apache/camel/management/ManagedNamePatternFixedTest.java
  261. +0 −55 camel-core/src/test/java/org/apache/camel/management/ManagedNamePatternTest.java
  262. +1 −7 camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddFromRouteTest.java
  263. +4 −4 camel-core/src/test/java/org/apache/camel/management/ManagedRouteAddRemoveTest.java
  264. +0 −63 camel-core/src/test/java/org/apache/camel/management/ManagedRouteDumpStatsAsXmlTest.java
  265. +0 −106 camel-core/src/test/java/org/apache/camel/management/ManagedSedaRouteRemoveTest.java
  266. +2 −1 camel-core/src/test/java/org/apache/camel/management/ManagedUnregisterCamelContextTest.java
  267. +2 −2 ...re/src/test/java/org/apache/camel/management/TwoManagedCamelContextAutoAssignedNameClashTest.java
  268. +7 −51 camel-core/src/test/java/org/apache/camel/management/TwoManagedCamelContextClashTest.java
  269. +0 −73 camel-core/src/test/java/org/apache/camel/management/TwoManagedNamePatternTest.java
  270. +3 −3 camel-core/src/test/java/org/apache/camel/model/ChoiceDefinitionTest.java
  271. +1 −1 camel-core/src/test/java/org/apache/camel/model/GenerateXmlTest.java
  272. +1 −1 camel-core/src/test/java/org/apache/camel/model/ModelSanityCheckerTest.java
  273. +6 −6 camel-core/src/test/java/org/apache/camel/model/XmlParseTest.java
  274. +1 −1 camel-core/src/test/java/org/apache/camel/processor/Animal.java
  275. +2 −2 camel-core/src/test/java/org/apache/camel/processor/ChoiceWithEndTest.java
  276. +1 −0 camel-core/src/test/java/org/apache/camel/processor/ChoiceWithTranfromTest.java
  277. +2 −2 camel-core/src/test/java/org/apache/camel/processor/CustomProcessorFactoryTest.java
  278. +0 −1 camel-core/src/test/java/org/apache/camel/processor/DataFormatTest.java
  279. +4 −4 camel-core/src/test/java/org/apache/camel/processor/DeadLetterChannelHandledExampleTest.java
  280. +3 −2 ...ore/src/test/java/org/apache/camel/processor/DeadLetterChannelRedeliverWithDelayBlockingTest.java
  281. +5 −2 camel-core/src/test/java/org/apache/camel/processor/DelayerPerRouteTest.java
  282. +3 −3 camel-core/src/test/java/org/apache/camel/processor/DualPipelineTest.java
  283. +3 −5 camel-core/src/test/java/org/apache/camel/processor/ErrorHandlerSupportTest.java
  284. +0 −50 camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalanceAutoStartupFalseTest.java
  285. +0 −2 camel-core/src/test/java/org/apache/camel/processor/FailOverLoadBalanceTest.java
  286. +2 −2 camel-core/src/test/java/org/apache/camel/processor/IdempotentConsumerTest.java
  287. +1 −1 camel-core/src/test/java/org/apache/camel/processor/NavigateRouteTest.java
  288. +7 −5 camel-core/src/test/java/org/apache/camel/processor/RandomLoadBalanceJavaDSLBuilderTest.java
  289. +1 −1 ...e/src/test/java/org/apache/camel/processor/RecipientListParallelAggregateThreadPoolIssueTest.java
  290. +1 −1 camel-core/src/test/java/org/apache/camel/processor/SortBodyTest.java
  291. +3 −3 camel-core/src/test/java/org/apache/camel/processor/SortExpressionTest.java
  292. +2 −2 camel-core/src/test/java/org/apache/camel/processor/SplitWithEndTest.java
  293. +2 −2 camel-core/src/test/java/org/apache/camel/processor/SplitterNullBodyTest.java
  294. +3 −0 camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingWithErrorHandlerTest.java
  295. +2 −2 camel-core/src/test/java/org/apache/camel/processor/SplitterTest.java
  296. +3 −2 camel-core/src/test/java/org/apache/camel/processor/SplitterWithCustomThreadPoolExecutorTest.java
  297. +4 −148 camel-core/src/test/java/org/apache/camel/processor/ThreadsRejectedExecutionTest.java
  298. +0 −1 camel-core/src/test/java/org/apache/camel/processor/TryCatchMustHaveExceptionConfiguredTest.java
  299. +0 −2 camel-core/src/test/java/org/apache/camel/processor/TryProcessorMultipleExceptionTest.java
  300. +0 −2 camel-core/src/test/java/org/apache/camel/processor/TryProcessorOnWhenTest.java
Sorry, we could not display the entire diff because too many files (1,478) changed.
View
42 apache-camel/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>2.9.1</version>
<relativePath>../parent</relativePath>
</parent>
@@ -73,18 +73,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-avro</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-bam</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-beanio</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-bean-validator</artifactId>
</dependency>
<dependency>
@@ -105,10 +97,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-cdi</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-cometd</artifactId>
</dependency>
<dependency>
@@ -177,10 +165,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-gson</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-hawtdb</artifactId>
</dependency>
<dependency>
@@ -312,10 +296,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-mongodb</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-msv</artifactId>
<!--Avoid the WARNING message -->
<exclusions>
@@ -455,10 +435,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-ssh</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-stax</artifactId>
</dependency>
<dependency>
@@ -479,30 +455,14 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-test-blueprint</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-test-spring</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-testng</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-twitter</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-velocity</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-websocket</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-xmlbeans</artifactId>
</dependency>
<dependency>
View
12 apache-camel/src/main/descriptors/common-bin.xml
@@ -38,15 +38,12 @@
<include>org.apache.camel:camel-apns</include>
<include>org.apache.camel:camel-atom</include>
<include>org.apache.camel:camel-aws</include>
- <include>org.apache.camel:camel-avro</include>
<include>org.apache.camel:camel-bam</include>
- <include>org.apache.camel:camel-beanio</include>
<include>org.apache.camel:camel-bean-validator</include>
<include>org.apache.camel:camel-bindy</include>
<include>org.apache.camel:camel-blueprint</include>
<include>org.apache.camel:camel-cache</include>
<include>org.apache.camel:camel-castor</include>
- <include>org.apache.camel:camel-cdi</include>
<include>org.apache.camel:camel-core</include>
<include>org.apache.camel:camel-core-osgi</include>
<include>org.apache.camel:camel-cometd</include>
@@ -67,7 +64,6 @@
<include>org.apache.camel:camel-gae</include>
<include>org.apache.camel:camel-groovy</include>
<include>org.apache.camel:camel-guice</include>
- <include>org.apache.camel:camel-gson</include>
<include>org.apache.camel:camel-hl7</include>
<include>org.apache.camel:camel-hawtdb</include>
<include>org.apache.camel:camel-hazelcast</include>
@@ -99,7 +95,6 @@
<include>org.apache.camel:camel-mail</include>
<include>org.apache.camel:camel-mina</include>
<include>org.apache.camel:camel-mina2</include>
- <include>org.apache.camel:camel-mongodb</include>
<include>org.apache.camel:camel-msv</include>
<include>org.apache.camel:camel-mvel</include>
<include>org.apache.camel:camel-mybatis</include>
@@ -132,19 +127,14 @@
<include>org.apache.camel:camel-spring-security</include>
<include>org.apache.camel:camel-spring-ws</include>
<include>org.apache.camel:camel-sql</include>
- <include>org.apache.camel:camel-ssh</include>
<include>org.apache.camel:camel-stax</include>
<include>org.apache.camel:camel-stream</include>
<include>org.apache.camel:camel-stringtemplate</include>
<include>org.apache.camel:camel-syslog</include>
- <include>org.apache.camel:camel-tagsoup</include>
<include>org.apache.camel:camel-test</include>
- <include>org.apache.camel:camel-test-blueprint</include>
- <include>org.apache.camel:camel-test-spring</include>
<include>org.apache.camel:camel-testng</include>
- <include>org.apache.camel:camel-twitter</include>
+ <include>org.apache.camel:camel-tagsoup</include>
<include>org.apache.camel:camel-velocity</include>
- <include>org.apache.camel:camel-websocket</include>
<include>org.apache.camel:camel-xmlbeans</include>
<include>org.apache.camel:camel-xmlsecurity</include>
<include>org.apache.camel:camel-xmpp</include>
View
4 buildingtools/pom.xml
@@ -23,11 +23,11 @@
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>2.9.1</version>
</parent>
<artifactId>camel-buildtools</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>2.9.1</version>
<name>Apache :: Camel Buildtools</name>
<description>The build tools for the Camel project</description>
<packaging>jar</packaging>
View
2 camel-core/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.camel</groupId>
<artifactId>camel-parent</artifactId>
- <version>2.10-SNAPSHOT</version>
+ <version>2.9.1</version>
<relativePath>../parent</relativePath>
</parent>
View
26 camel-core/src/main/java/org/apache/camel/CamelContext.java
@@ -41,7 +41,6 @@
import org.apache.camel.spi.Language;
import org.apache.camel.spi.LifecycleStrategy;
import org.apache.camel.spi.ManagementMBeanAssembler;
-import org.apache.camel.spi.ManagementNameStrategy;
import org.apache.camel.spi.ManagementStrategy;
import org.apache.camel.spi.NodeIdFactory;
import org.apache.camel.spi.PackageScanClassResolver;
@@ -100,20 +99,6 @@
void setNameStrategy(CamelContextNameStrategy nameStrategy);
/**
- * Gets the current management name strategy
- *
- * @return management name strategy
- */
- ManagementNameStrategy getManagementNameStrategy();
-
- /**
- * Sets a custom management name strategy
- *
- * @param nameStrategy name strategy
- */
- void setManagementNameStrategy(ManagementNameStrategy nameStrategy);
-
- /**
* Gets the name this {@link CamelContext} was registered in JMX.
* <p/>
* The reason that a {@link CamelContext} can have a different name in JMX is the fact to remedy for name clash
@@ -125,6 +110,13 @@
String getManagementName();
/**
+ * Sets the name this {@link CamelContext} was registered in JMX.
+ *
+ * @param name the actual name used when registering this {@link CamelContext} in JMX
+ */
+ void setManagementName(String name);
+
+ /**
* Gets the version of the this context.
*
* @return the version
@@ -1040,18 +1032,14 @@
* Whether or not type converters should be loaded lazy
*
* @return <tt>true</tt> to load lazy, <tt>false</tt> to load on startup
- * @deprecated this option is no longer supported, will be removed in a future Camel release.
*/
- @Deprecated
Boolean isLazyLoadTypeConverters();
/**
* Sets whether type converters should be loaded lazy
*
* @param lazyLoadTypeConverters <tt>true</tt> to load lazy, <tt>false</tt> to load on startup
- * @deprecated this option is no longer supported, will be removed in a future Camel release.
*/
- @Deprecated
void setLazyLoadTypeConverters(Boolean lazyLoadTypeConverters);
/**
View
5 camel-core/src/main/java/org/apache/camel/ErrorHandlerFactory.java
@@ -18,13 +18,10 @@
import org.apache.camel.spi.RouteContext;
-/**
- * Factory for creating {@link org.apache.camel.processor.ErrorHandler}s.
- */
public interface ErrorHandlerFactory {
/**
- * Creates the error handler
+ * Creates the error handler interceptor
*
* @param routeContext the route context
* @param processor the outer processor
View
1 camel-core/src/main/java/org/apache/camel/Exchange.java
@@ -137,7 +137,6 @@
String HTTP_SERVLET_RESPONSE = "CamelHttpServletResponse";
String INTERCEPTED_ENDPOINT = "CamelInterceptedEndpoint";
- String INTERCEPT_SEND_TO_ENDPOINT_WHEN_MATCHED = "CamelInterceptSendToEndpointWhenMatched";
String LANGUAGE_SCRIPT = "CamelLanguageScript";
String LOG_DEBUG_BODY_MAX_CHARS = "CamelLogDebugBodyMaxChars";
View
29 camel-core/src/main/java/org/apache/camel/Rejectable.java
@@ -1,29 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel;
-
-/**
- * Reject executing or processing some task.
- */
-public interface Rejectable {
-
- /**
- * The task was rejected.
- */
- void reject();
-
-}
View
55 camel-core/src/main/java/org/apache/camel/ThreadPoolRejectedPolicy.java
@@ -29,6 +29,8 @@
* a new task.
* <p/>
* Camel will by default use <tt>CallerRuns</tt>.
+ *
+ * @version
*/
@XmlType
@XmlEnum(String.class)
@@ -38,58 +40,13 @@
public RejectedExecutionHandler asRejectedExecutionHandler() {
if (this == Abort) {
- return new RejectedExecutionHandler() {
- @Override
- public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
- if (r instanceof Rejectable) {
- ((Rejectable) r).reject();
- }
- }
-
- @Override
- public String toString() {
- return "Abort";
- }
- };
+ return new ThreadPoolExecutor.AbortPolicy();
} else if (this == CallerRuns) {
- return new ThreadPoolExecutor.CallerRunsPolicy() {
- @Override
- public String toString() {
- return "CallerRuns";
- }
- };
+ return new ThreadPoolExecutor.CallerRunsPolicy();
} else if (this == DiscardOldest) {
- return new RejectedExecutionHandler() {
- @Override
- public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
- if (!executor.isShutdown()) {
- Runnable rejected = executor.getQueue().poll();
- if (rejected instanceof Rejectable) {
- ((Rejectable) rejected).reject();
- }
- executor.execute(r);
- }
- }
-
- @Override
- public String toString() {
- return "DiscardOldest";
- }
- };
+ return new ThreadPoolExecutor.DiscardOldestPolicy();
} else if (this == Discard) {
- return new RejectedExecutionHandler() {
- @Override
- public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) {
- if (r instanceof Rejectable) {
- ((Rejectable) r).reject();
- }
- }
-
- @Override
- public String toString() {
- return "Discard";
- }
- };
+ return new ThreadPoolExecutor.DiscardPolicy();
}
throw new IllegalArgumentException("Unknown ThreadPoolRejectedPolicy: " + this);
}
View
3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
@@ -111,9 +111,6 @@
@ManagedOperation(description = "Adds or updates existing routes from XML")
void addOrUpdateRoutesFromXml(String xml) throws Exception;
- @ManagedOperation(description = "Dumps the routes stats as XML")
- String dumpRoutesStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception;
-
/**
* Creates the endpoint by the given uri
*
View
3 ...e/src/main/java/org/apache/camel/api/management/mbean/ManagedPerformanceCounterMBean.java
@@ -83,7 +83,4 @@
@ManagedAttribute(description = "Statistics enabled")
void setStatisticsEnabled(boolean statisticsEnabled);
- @ManagedOperation(description = "Dumps the statistics as XML")
- String dumpStatsAsXml(boolean fullStats);
-
}
View
3 camel-core/src/main/java/org/apache/camel/api/management/mbean/ManagedRouteMBean.java
@@ -92,7 +92,4 @@
@ManagedOperation(description = "Updates the route from XML")
void updateRouteFromXml(String xml) throws Exception;
- @ManagedOperation(description = "Dumps the routes stats as XML")
- String dumpRouteStatsAsXml(boolean fullStats, boolean includeProcessors) throws Exception;
-
}
View
8 camel-core/src/main/java/org/apache/camel/builder/AdviceWithBuilder.java
@@ -23,7 +23,7 @@
/**
* A builder when using the <a href="http://camel.apache.org/advicewith.html">advice with</a> feature.
*/
-public class AdviceWithBuilder<T extends ProcessorDefinition<?>> {
+public class AdviceWithBuilder<T extends ProcessorDefinition> {
private final AdviceWithRouteBuilder builder;
private final String id;
@@ -106,7 +106,7 @@ public AdviceWithBuilder(AdviceWithRouteBuilder builder, String id, String toStr
*
* @return the builder to build the nodes.
*/
- public ProcessorDefinition<?> replace() {
+ public ProcessorDefinition replace() {
RouteDefinition route = builder.getOriginalRoute();
PipelineDefinition answer = new PipelineDefinition();
if (id != null) {
@@ -138,7 +138,7 @@ public void remove() {
*
* @return the builder to build the nodes.
*/
- public ProcessorDefinition<?> before() {
+ public ProcessorDefinition before() {
RouteDefinition route = builder.getOriginalRoute();
PipelineDefinition answer = new PipelineDefinition();
if (id != null) {
@@ -156,7 +156,7 @@ public void remove() {
*
* @return the builder to build the nodes.
*/
- public ProcessorDefinition<?> after() {
+ public ProcessorDefinition after() {
RouteDefinition route = builder.getOriginalRoute();
PipelineDefinition answer = new PipelineDefinition();
if (id != null) {
View
10 camel-core/src/main/java/org/apache/camel/builder/AdviceWithRouteBuilder.java
@@ -117,7 +117,7 @@ public void replaceFromWith(Endpoint endpoint) {
* @return the builder
* @see org.apache.camel.util.EndpointHelper#matchPattern(String, String)
*/
- public <T extends ProcessorDefinition<?>> AdviceWithBuilder<T> weaveById(String pattern) {
+ public <T extends ProcessorDefinition> AdviceWithBuilder weaveById(String pattern) {
ObjectHelper.notNull(originalRoute, "originalRoute", this);
return new AdviceWithBuilder<T>(this, pattern, null, null);
}
@@ -131,7 +131,7 @@ public void replaceFromWith(Endpoint endpoint) {
* @return the builder
* @see org.apache.camel.util.EndpointHelper#matchPattern(String, String)
*/
- public <T extends ProcessorDefinition<?>> AdviceWithBuilder<T> weaveByToString(String pattern) {
+ public <T extends ProcessorDefinition> AdviceWithBuilder weaveByToString(String pattern) {
ObjectHelper.notNull(originalRoute, "originalRoute", this);
return new AdviceWithBuilder<T>(this, null, pattern, null);
}
@@ -142,7 +142,7 @@ public void replaceFromWith(Endpoint endpoint) {
* @param type the processor type
* @return the builder
*/
- public <T extends ProcessorDefinition<?>> AdviceWithBuilder<T> weaveByType(Class<T> type) {
+ public <T extends ProcessorDefinition> AdviceWithBuilder weaveByType(Class<T> type) {
ObjectHelper.notNull(originalRoute, "originalRoute", this);
return new AdviceWithBuilder<T>(this, null, null, type);
}
@@ -152,7 +152,7 @@ public void replaceFromWith(Endpoint endpoint) {
*
* @return the builder
*/
- public <T extends ProcessorDefinition<?>> ProcessorDefinition<?> weaveAddFirst() {
+ public <T extends ProcessorDefinition> ProcessorDefinition weaveAddFirst() {
ObjectHelper.notNull(originalRoute, "originalRoute", this);
return new AdviceWithBuilder<T>(this, "*", null, null).selectFirst().before();
}
@@ -162,7 +162,7 @@ public void replaceFromWith(Endpoint endpoint) {
*
* @return the builder
*/
- public <T extends ProcessorDefinition<?>> ProcessorDefinition<?> weaveAddLast() {
+ public <T extends ProcessorDefinition> ProcessorDefinition weaveAddLast() {
ObjectHelper.notNull(originalRoute, "originalRoute", this);
return new AdviceWithBuilder<T>(this, "*", null, null).selectLast().after();
}
View
101 camel-core/src/main/java/org/apache/camel/builder/AdviceWithTasks.java
@@ -47,7 +47,7 @@ private AdviceWithTasks() {
String getId();
- boolean match(ProcessorDefinition<?> processor);
+ boolean match(ProcessorDefinition processor);
}
/**
@@ -65,7 +65,7 @@ public String getId() {
return id;
}
- public boolean match(ProcessorDefinition<?> processor) {
+ public boolean match(ProcessorDefinition processor) {
return EndpointHelper.matchPattern(processor.getId(), id);
}
}
@@ -85,7 +85,7 @@ public String getId() {
return toString;
}
- public boolean match(ProcessorDefinition<?> processor) {
+ public boolean match(ProcessorDefinition processor) {
return EndpointHelper.matchPattern(processor.toString(), toString);
}
}
@@ -105,41 +105,42 @@ public String getId() {
return type.getSimpleName();
}
- public boolean match(ProcessorDefinition<?> processor) {
+ public boolean match(ProcessorDefinition processor) {
return type.isAssignableFrom(processor.getClass());
}
}
- public static AdviceWithTask replaceByToString(final RouteDefinition route, final String toString, final ProcessorDefinition<?> replace,
+ public static AdviceWithTask replaceByToString(final RouteDefinition route, final String toString, final ProcessorDefinition replace,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByToString(toString);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doReplace(route, new MatchByToString(toString), replace, it);
}
- public static AdviceWithTask replaceById(final RouteDefinition route, final String id, final ProcessorDefinition<?> replace,
+ public static AdviceWithTask replaceById(final RouteDefinition route, final String id, final ProcessorDefinition replace,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchById(id);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doReplace(route, matchBy, replace, it);
}
- public static AdviceWithTask replaceByType(final RouteDefinition route, final Class<?> type, final ProcessorDefinition<?> replace,
+ public static AdviceWithTask replaceByType(final RouteDefinition route, final Class type, final ProcessorDefinition replace,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByType(type);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doReplace(route, matchBy, replace, it);
}
- private static AdviceWithTask doReplace(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition<?> replace,
- final Iterator<ProcessorDefinition<?>> it) {
+ @SuppressWarnings("unchecked")
+ private static AdviceWithTask doReplace(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition replace,
+ final Iterator<ProcessorDefinition> it) {
return new AdviceWithTask() {
public void task() throws Exception {
boolean match = false;
while (it.hasNext()) {
- ProcessorDefinition<?> output = it.next();
+ ProcessorDefinition output = it.next();
if (matchBy.match(output)) {
- ProcessorDefinition<?> parent = output.getParent();
+ ProcessorDefinition parent = output.getParent();
if (parent != null) {
int index = parent.getOutputs().indexOf(output);
if (index != -1) {
@@ -162,33 +163,33 @@ public void task() throws Exception {
public static AdviceWithTask removeByToString(final RouteDefinition route, final String toString,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByToString(toString);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doRemove(route, matchBy, it);
}
public static AdviceWithTask removeById(final RouteDefinition route, final String id,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchById(id);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doRemove(route, matchBy, it);
}
- public static AdviceWithTask removeByType(final RouteDefinition route, final Class<?> type,
+ public static AdviceWithTask removeByType(final RouteDefinition route, final Class type,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByType(type);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doRemove(route, matchBy, it);
}
private static AdviceWithTask doRemove(final RouteDefinition route, final MatchBy matchBy,
- final Iterator<ProcessorDefinition<?>> it) {
+ final Iterator<ProcessorDefinition> it) {
return new AdviceWithTask() {
public void task() throws Exception {
boolean match = false;
while (it.hasNext()) {
- ProcessorDefinition<?> output = it.next();
+ ProcessorDefinition output = it.next();
if (matchBy.match(output)) {
- ProcessorDefinition<?> parent = output.getParent();
+ ProcessorDefinition parent = output.getParent();
if (parent != null) {
int index = parent.getOutputs().indexOf(output);
if (index != -1) {
@@ -207,36 +208,37 @@ public void task() throws Exception {
};
}
- public static AdviceWithTask beforeByToString(final RouteDefinition route, final String toString, final ProcessorDefinition<?> before,
+ public static AdviceWithTask beforeByToString(final RouteDefinition route, final String toString, final ProcessorDefinition before,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByToString(toString);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doBefore(route, matchBy, before, it);
}
- public static AdviceWithTask beforeById(final RouteDefinition route, final String id, final ProcessorDefinition<?> before,
+ public static AdviceWithTask beforeById(final RouteDefinition route, final String id, final ProcessorDefinition before,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchById(id);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doBefore(route, matchBy, before, it);
}
- public static AdviceWithTask beforeByType(final RouteDefinition route, final Class<?> type, final ProcessorDefinition<?> before,
+ public static AdviceWithTask beforeByType(final RouteDefinition route, final Class type, final ProcessorDefinition before,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByType(type);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doBefore(route, matchBy, before, it);
}
- private static AdviceWithTask doBefore(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition<?> before,
- final Iterator<ProcessorDefinition<?>> it) {
+ @SuppressWarnings("unchecked")
+ private static AdviceWithTask doBefore(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition before,
+ final Iterator<ProcessorDefinition> it) {
return new AdviceWithTask() {
public void task() throws Exception {
boolean match = false;
while (it.hasNext()) {
- ProcessorDefinition<?> output = it.next();
+ ProcessorDefinition output = it.next();
if (matchBy.match(output)) {
- ProcessorDefinition<?> parent = output.getParent();
+ ProcessorDefinition parent = output.getParent();
if (parent != null) {
int index = parent.getOutputs().indexOf(output);
if (index != -1) {
@@ -256,37 +258,38 @@ public void task() throws Exception {
};
}
- public static AdviceWithTask afterByToString(final RouteDefinition route, final String toString, final ProcessorDefinition<?> after,
+ public static AdviceWithTask afterByToString(final RouteDefinition route, final String toString, final ProcessorDefinition after,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByToString(toString);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doAfter(route, matchBy, after, it);
}
- public static AdviceWithTask afterById(final RouteDefinition route, final String id, final ProcessorDefinition<?> after,
+ public static AdviceWithTask afterById(final RouteDefinition route, final String id, final ProcessorDefinition after,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchById(id);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doAfter(route, matchBy, after, it);
}
- public static AdviceWithTask afterByType(final RouteDefinition route, final Class<?> type, final ProcessorDefinition<?> after,
+ public static AdviceWithTask afterByType(final RouteDefinition route, final Class type, final ProcessorDefinition after,
boolean selectFirst, boolean selectLast, int selectFrom, int selectTo) {
MatchBy matchBy = new MatchByType(type);
- Iterator<ProcessorDefinition<?>> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
+ Iterator<ProcessorDefinition> it = AdviceWithTasks.createMatchByIterator(route, matchBy, selectFirst, selectLast, selectFrom, selectTo);
return doAfter(route, matchBy, after, it);
}
- private static AdviceWithTask doAfter(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition<?> after,
- final Iterator<ProcessorDefinition<?>> it) {
+ @SuppressWarnings("unchecked")
+ private static AdviceWithTask doAfter(final RouteDefinition route, final MatchBy matchBy, final ProcessorDefinition after,
+ final Iterator<ProcessorDefinition> it) {
return new AdviceWithTask() {
public void task() throws Exception {
boolean match = false;
while (it.hasNext()) {
- ProcessorDefinition<?> output = it.next();
+ ProcessorDefinition output = it.next();
if (matchBy.match(output)) {
- ProcessorDefinition<?> parent = output.getParent();
+ ProcessorDefinition parent = output.getParent();
if (parent != null) {
int index = parent.getOutputs().indexOf(output);
if (index != -1) {
@@ -342,17 +345,15 @@ public void task() throws Exception {
*
* @return the iterator
*/
- private static Iterator<ProcessorDefinition<?>> createMatchByIterator(final RouteDefinition route, final MatchBy matchBy,
+ private static Iterator<ProcessorDefinition> createMatchByIterator(final RouteDefinition route, final MatchBy matchBy,
final boolean selectFirst, final boolean selectLast,
final int selectFrom, final int selectTo) {
// first iterator and apply match by
- List<ProcessorDefinition<?>> matched = new ArrayList<ProcessorDefinition<?>>();
-
- @SuppressWarnings("rawtypes")
+ List<ProcessorDefinition> matched = new ArrayList<ProcessorDefinition>();
Iterator<ProcessorDefinition> itAll = ProcessorDefinitionHelper.filterTypeInOutputs(route.getOutputs(), ProcessorDefinition.class);
while (itAll.hasNext()) {
- ProcessorDefinition<?> next = itAll.next();
+ ProcessorDefinition next = itAll.next();
if (matchBy.match(next)) {
matched.add(next);
}
@@ -362,9 +363,9 @@ public void task() throws Exception {
return createSelectorIterator(matched, selectFirst, selectLast, selectFrom, selectTo);
}
- private static Iterator<ProcessorDefinition<?>> createSelectorIterator(final List<ProcessorDefinition<?>> list, final boolean selectFirst,
+ private static Iterator<ProcessorDefinition> createSelectorIterator(final List<ProcessorDefinition> list, final boolean selectFirst,
final boolean selectLast, final int selectFrom, final int selectTo) {
- return new Iterator<ProcessorDefinition<?>>() {
+ return new Iterator<ProcessorDefinition>() {
private int current;
private boolean done;
@@ -404,8 +405,8 @@ public boolean hasNext() {
}
@Override
- public ProcessorDefinition<?> next() {
- ProcessorDefinition<?> answer = list.get(current);
+ public ProcessorDefinition next() {
+ ProcessorDefinition answer = list.get(current);
current++;
return answer;
}
View
2 camel-core/src/main/java/org/apache/camel/builder/BuilderSupport.java
@@ -184,7 +184,7 @@ public ValueBuilder bean(Object beanOrBeanRef, String method) {
if (beanOrBeanRef instanceof String) {
expression = new MethodCallExpression((String) beanOrBeanRef, method);
} else {
- expression = new MethodCallExpression(beanOrBeanRef, method);
+ expression = new MethodCallExpression((Object) beanOrBeanRef, method);
}
return new ValueBuilder(expression);
}
View
21 camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -23,7 +23,6 @@
import org.apache.camel.model.DataFormatDefinition;
import org.apache.camel.model.ProcessorDefinition;
-import org.apache.camel.model.dataformat.AvroDataFormat;
import org.apache.camel.model.dataformat.BindyDataFormat;
import org.apache.camel.model.dataformat.BindyType;
import org.apache.camel.model.dataformat.CastorDataFormat;
@@ -72,24 +71,6 @@ public DataFormatClause(T processorType, Operation operation) {
this.operation = operation;
}
-
- /**
- * Uses the Avro data format
- */
- public T avro() {
- return dataFormat(new AvroDataFormat());
- }
-
- public T avro(Object schema) {
- AvroDataFormat dataFormat = new AvroDataFormat();
- dataFormat.setSchema(schema);
- return dataFormat(dataFormat);
- }
-
- public T avro(String instanceClassName) {
- return dataFormat(new AvroDataFormat(instanceClassName));
- }
-
/**
* Uses the Bindy data format
*
@@ -239,7 +220,7 @@ public T jibx() {
/**
* Uses the JiBX data format with unmarshall class.
*/
- public T jibx(Class<?> unmarshallClass) {
+ public T jibx(Class unmarshallClass) {
return dataFormat(new JibxDataFormat(unmarshallClass));
}
View
37 camel-core/src/main/java/org/apache/camel/builder/ExpressionBuilder.java
@@ -162,8 +162,9 @@ public String toString() {
*/
public static Expression headerExpression(final String headerName, final String name) {
return new ExpressionAdapter() {
+ @SuppressWarnings("unchecked")
public Object evaluate(Exchange exchange) {
- Class<?> type;
+ Class type;
try {
type = exchange.getContext().getClassResolver().resolveMandatoryClass(name);
} catch (ClassNotFoundException e) {
@@ -442,24 +443,6 @@ public String toString() {
}
/**
- * Returns an expression for the {@link org.apache.camel.CamelContext} name
- *
- * @return an expression object which will return the camel context name
- */
- public static Expression camelContextNameExpression() {
- return new ExpressionAdapter() {
- public Object evaluate(Exchange exchange) {
- return exchange.getContext().getName();
- }
-
- @Override
- public String toString() {
- return "camelContextName";
- }
- };
- }
-
- /**
* Returns an expression for an exception message set on the exchange
*
* @see <tt>Exchange.getException().getMessage()</tt>
@@ -498,7 +481,8 @@ public Object evaluate(Exchange exchange) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
exception.printStackTrace(pw);
- IOHelper.close(pw, sw);
+ IOHelper.close(pw);
+ IOHelper.close(sw);
return sw.toString();
} else {
return null;
@@ -748,8 +732,9 @@ public String toString() {
*/
public static Expression bodyExpression(final String name) {
return new ExpressionAdapter() {
+ @SuppressWarnings("unchecked")
public Object evaluate(Exchange exchange) {
- Class<?> type;
+ Class type;
try {
type = exchange.getContext().getClassResolver().resolveMandatoryClass(name);
} catch (ClassNotFoundException e) {
@@ -771,8 +756,9 @@ public String toString() {
*/
public static Expression mandatoryBodyExpression(final String name) {
return new ExpressionAdapter() {
+ @SuppressWarnings("unchecked")
public Object evaluate(Exchange exchange) {
- Class<?> type;
+ Class type;
try {
type = exchange.getContext().getClassResolver().resolveMandatoryClass(name);
} catch (ClassNotFoundException e) {
@@ -996,7 +982,8 @@ public String toString() {
/**
* Returns an expression which converts the given expression to the given type
*/
- public static Expression convertToExpression(final Expression expression, final Class<?> type) {
+ @SuppressWarnings("unchecked")
+ public static Expression convertToExpression(final Expression expression, final Class type) {
return new ExpressionAdapter() {
public Object evaluate(Exchange exchange) {
if (type != null) {
@@ -1118,11 +1105,11 @@ public String toString() {
* <p/>
* The expression is evaluted as a {@link List} object to allow sorting.
*/
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings("unchecked")
public static Expression sortExpression(final Expression expression, final Comparator comparator) {
return new ExpressionAdapter() {
public Object evaluate(Exchange exchange) {
- List<?> list = expression.evaluate(exchange, List.class);
+ List list = expression.evaluate(exchange, List.class);
Collections.sort(list, comparator);
return list;
}
View
2 camel-core/src/main/java/org/apache/camel/builder/ExpressionClause.java
@@ -104,7 +104,7 @@ public T outBody() {
/**
* An expression of an outbound message body converted to the expected type
*/
- public T outBody(Class<?> expectedType) {
+ public T outBody(Class expectedType) {
return delegate.outBody(expectedType);
}
View
6 camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java
@@ -117,7 +117,8 @@ public T body() {
/**
* An expression of an inbound message body converted to the expected type
*/
- public T body(Class<?> expectedType) {
+ @SuppressWarnings("unchecked")
+ public T body(Class expectedType) {
return expression(ExpressionBuilder.bodyExpression(expectedType));
}
@@ -131,7 +132,8 @@ public T outBody() {
/**
* An expression of an outbound message body converted to the expected type
*/
- public T outBody(Class<?> expectedType) {
+ @SuppressWarnings("unchecked")
+ public T outBody(Class expectedType) {
return expression(ExpressionBuilder.outBodyExpression(expectedType));
}
View
2 camel-core/src/main/java/org/apache/camel/builder/NotifyBuilder.java
@@ -1058,7 +1058,7 @@ public NotifyBuilder whenExactBodiesDone(Object... bodies) {
return doWhenBodies(bodyList, false, true);
}
- private NotifyBuilder doWhenBodies(final List<?> bodies, final boolean received, final boolean exact) {
+ private NotifyBuilder doWhenBodies(final List bodies, final boolean received, final boolean exact) {
stack.add(new EventPredicateSupport() {
private boolean matches;
private int current;
View
20 camel-core/src/main/java/org/apache/camel/builder/ProxyBuilder.java
@@ -60,28 +60,14 @@ public ProxyBuilder endpoint(Endpoint endpoint) {
/**
* Builds the proxy.
*
- * @param interfaceClass the service interface
- * @return the proxied bean
- * @throws Exception is thrown if error creating the proxy
- */
- @SuppressWarnings("unchecked")
- public <T> T build(Class<T> interfaceClass) throws Exception {
- // this method is introduced to avoid compiler warnings about the
- // generic Class arrays in the case we've got only one single Class
- // to build a Proxy for
- return build((Class<T>[]) new Class[] {interfaceClass});
- }
-
- /**
- * Builds the proxy.
- *
* @param interfaceClasses the service interface(s)
* @return the proxied bean
* @throws Exception is thrown if error creating the proxy
*/
- public <T> T build(Class<T>... interfaceClasses) throws Exception {
+ @SuppressWarnings("unchecked")
+ public <T> T build(Class<?>... interfaceClasses) throws Exception {
ObjectHelper.notNull(endpoint, "endpoint");
- return ProxyHelper.createProxy(endpoint, interfaceClasses);
+ return (T)ProxyHelper.createProxy(endpoint, interfaceClasses);
}
}
View
10 camel-core/src/main/java/org/apache/camel/builder/RouteBuilder.java
@@ -138,13 +138,15 @@ public RouteDefinition from(Endpoint... endpoints) {
* Installs the given <a href="http://camel.apache.org/error-handler.html">error handler</a> builder
*
* @param errorHandlerBuilder the error handler to be used by default for all child routes
+ * @return the current builder with the error handler configured
*/
- public void errorHandler(ErrorHandlerBuilder errorHandlerBuilder) {
+ public RouteBuilder errorHandler(ErrorHandlerBuilder errorHandlerBuilder) {
if (!getRouteCollection().getRoutes().isEmpty()) {
throw new IllegalArgumentException("errorHandler must be defined before any routes in the RouteBuilder");
}
getRouteCollection().setCamelContext(getContext());
setErrorHandlerBuilder(errorHandlerBuilder);
+ return this;
}
/**
@@ -208,7 +210,7 @@ public InterceptSendToEndpointDefinition interceptSendToEndpoint(String uri) {
* @param exception exception to catch
* @return the builder
*/
- public OnExceptionDefinition onException(Class<? extends Throwable> exception) {
+ public OnExceptionDefinition onException(Class exception) {
// is only allowed at the top currently
if (!getRouteCollection().getRoutes().isEmpty()) {
throw new IllegalArgumentException("onException must be defined before any routes in the RouteBuilder");
@@ -224,9 +226,9 @@ public OnExceptionDefinition onException(Class<? extends Throwable> exception) {
* @param exceptions list of exceptions to catch
* @return the builder
*/
- public OnExceptionDefinition onException(Class<? extends Throwable>... exceptions) {
+ public OnExceptionDefinition onException(Class... exceptions) {
OnExceptionDefinition last = null;
- for (Class<? extends Throwable> ex : exceptions) {
+ for (Class ex : exceptions) {
last = last == null ? onException(ex) : last.onException(ex);
}
return last != null ? last : onException(Exception.class);
View
49 camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
@@ -89,7 +89,7 @@
private static XPathFactory defaultXPathFactory;
private final Queue<XPathExpression> pool = new ConcurrentLinkedQueue<XPathExpression>();
- private final Queue<XPathExpression> poolLogNamespaces = new ConcurrentLinkedQueue<XPathExpression>();
+ private final Queue<XPathExpression> poolTraceNamespaces = new ConcurrentLinkedQueue<XPathExpression>();
private final String text;
private final ThreadLocal<MessageVariableResolver> variableResolver = new ThreadLocal<MessageVariableResolver>();
private final ThreadLocal<Exchange> exchange = new ThreadLocal<Exchange>();
@@ -103,7 +103,7 @@
private QName resultQName = XPathConstants.NODESET;
private String objectModelUri;
private DefaultNamespaceContext namespaceContext;
- private boolean logNamespaces;
+ private boolean traceNamespaces;
private XPathFunctionResolver functionResolver;
private XPathFunction bodyFunction;
private XPathFunction headerFunction;
@@ -397,8 +397,8 @@ public XPathBuilder factory(XPathFactory xpathFactory) {
*
* @return the current builder.
*/
- public XPathBuilder logNamespaces() {
- setLogNamespaces(true);
+ public XPathBuilder traceNamespaces() {
+ setTraceNamespaces(true);
return this;
}
@@ -477,7 +477,6 @@ public void setNamespaces(Map<String, String> namespaces) {
public XPathFunction getBodyFunction() {
if (bodyFunction == null) {
bodyFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange == null) {
return null;
@@ -496,7 +495,6 @@ public void setBodyFunction(XPathFunction bodyFunction) {
public XPathFunction getHeaderFunction() {
if (headerFunction == null) {
headerFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange != null && !list.isEmpty()) {
Object value = list.get(0);
@@ -519,7 +517,6 @@ public void setHeaderFunction(XPathFunction headerFunction) {
public XPathFunction getOutBodyFunction() {
if (outBodyFunction == null) {
outBodyFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange.get() != null && exchange.get().hasOut()) {
return exchange.get().getOut().getBody();
@@ -538,7 +535,6 @@ public void setOutBodyFunction(XPathFunction outBodyFunction) {
public XPathFunction getOutHeaderFunction() {
if (outHeaderFunction == null) {
outHeaderFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange.get() != null && !list.isEmpty()) {
Object value = list.get(0);
@@ -561,7 +557,6 @@ public void setOutHeaderFunction(XPathFunction outHeaderFunction) {
public XPathFunction getPropertiesFunction() {
if (propertiesFunction == null) {
propertiesFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange != null && !list.isEmpty()) {
Object value = list.get(0);
@@ -590,7 +585,6 @@ public void setPropertiesFunction(XPathFunction propertiesFunction) {
public XPathFunction getSimpleFunction() {
if (simpleFunction == null) {
simpleFunction = new XPathFunction() {
- @SuppressWarnings("rawtypes")
public Object evaluate(List list) throws XPathFunctionException {
if (exchange != null && !list.isEmpty()) {
Object value = list.get(0);
@@ -632,12 +626,12 @@ public void setResultType(Class<?> resultType) {
}
}
- public void setLogNamespaces(boolean logNamespaces) {
- this.logNamespaces = logNamespaces;
+ public void setTraceNamespaces(boolean traceNamespaces) {
+ this.traceNamespaces = traceNamespaces;
}
- public boolean isLogNamespaces() {
- return logNamespaces;
+ public boolean isTraceNamespaces() {
+ return traceNamespaces;
}
public String getObjectModelUri() {
@@ -687,8 +681,8 @@ protected Object evaluateAs(Exchange exchange, QName resultQName) {
LOG.trace("Acquired XPathExpression from pool");
}
try {
- if (logNamespaces && LOG.isInfoEnabled()) {
- logNamespaces(exchange);
+ if (traceNamespaces && LOG.isTraceEnabled()) {
+ traceNamespaces(exchange);
}
return doInEvaluateAs(xpathExpression, exchange, resultQName);
} finally {
@@ -698,13 +692,13 @@ protected Object evaluateAs(Exchange exchange, QName resultQName) {
}
}
- private void logNamespaces(Exchange exchange) {
+ private void traceNamespaces(Exchange exchange) {
InputStream is = null;
NodeList answer = null;
XPathExpression xpathExpression = null;
try {
- xpathExpression = poolLogNamespaces.poll();
+ xpathExpression = poolTraceNamespaces.poll();
if (xpathExpression == null) {
xpathExpression = createTraceNamespaceExpression();
}
@@ -729,11 +723,11 @@ private void logNamespaces(Exchange exchange) {
answer = (NodeList) xpathExpression.evaluate(document, XPathConstants.NODESET);
}
} catch (Exception e) {
- LOG.warn("Unable to trace discovered namespaces in XPath expression", e);
+ LOG.trace("Unable to trace discovered namespaces in XPath expression", e);
} finally {
// IOHelper can handle if is is null
IOHelper.close(is);
- poolLogNamespaces.add(xpathExpression);
+ poolTraceNamespaces.add(xpathExpression);
}
if (answer != null) {
@@ -762,7 +756,7 @@ private void logDiscoveredNamespaces(NodeList namespaces) {
map.get(prefix).add(namespaces.item(i).getNodeValue());
}
- LOG.info("Namespaces discovered in message: {}.", map);
+ LOG.trace("Namespaces discovered in message: {}.", map);
}
protected Object doInEvaluateAs(XPathExpression xpathExpression, Exchange exchange, QName resultQName) {
@@ -823,10 +817,8 @@ protected synchronized XPathExpression createXPathExpression() throws XPathExpre
// XPathFactory is not thread safe
XPath xPath = getXPathFactory().newXPath();
- if (!logNamespaces && LOG.isTraceEnabled()) {
+ if (LOG.isTraceEnabled()) {
LOG.trace("Creating new XPath expression in pool. Namespaces on XPath expression: {}", getNamespaceContext().toString());
- } else if (logNamespaces && LOG.isInfoEnabled()) {
- LOG.info("Creating new XPath expression in pool. Namespaces on XPath expression: {}", getNamespaceContext().toString());
}
xPath.setNamespaceContext(getNamespaceContext());
xPath.setXPathVariableResolver(getVariableResolver());
@@ -923,7 +915,7 @@ protected boolean isInputStreamNeeded(Exchange exchange) {
}
if (body instanceof WrappedFile) {
- body = ((WrappedFile<?>) body).getFile();
+ body = ((WrappedFile) body).getFile();
}
if (body instanceof File) {
// input stream is needed for File to avoid locking the file in case of errors etc
@@ -937,10 +929,11 @@ protected boolean isInputStreamNeeded(Exchange exchange) {
/**
* Strategy method to extract the document from the exchange.
*/
+ @SuppressWarnings("unchecked")
protected Object getDocument(Exchange exchange, Object body) {
Object answer = null;
- Class<?> type = getDocumentType();
+ Class type = getDocumentType();
if (type != null) {
// try to get the body as the desired type
answer = exchange.getContext().getTypeConverter().convertTo(type, exchange, body);
@@ -988,7 +981,7 @@ public void start() throws Exception {
public void stop() throws Exception {
pool.clear();
- poolLogNamespaces.clear();
+ poolTraceNamespaces.clear();
}
protected synchronized void initDefaultXPathFactory() throws XPathFactoryConfigurationException {
@@ -1001,7 +994,7 @@ protected synchronized void initDefaultXPathFactory() throws XPathFactoryConfigu
if (defaultXPathFactory == null) {
// read system property and see if there is a factory set
Properties properties = System.getProperties();
- for (Map.Entry<Object, Object> prop : properties.entrySet()) {
+ for (Map.Entry prop : properties.entrySet()) {
String key = (String) prop.getKey();
if (key.startsWith(XPathFactory.DEFAULT_PROPERTY_NAME)) {
String uri = ObjectHelper.after(key, ":");
View
2 camel-core/src/main/java/org/apache/camel/component/bean/BeanConverter.java
@@ -43,7 +43,7 @@ public static Object convertTo(Class<?> type, Exchange exchange, Object value, T
return Void.TYPE;
}
- Class<?> from = bi.getArgs()[0].getClass();
+ Class from = bi.getArgs()[0].getClass();
Object body = bi.getArgs()[0];
// maybe from is already the type we want