This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 61e3a311990c79451b7ec12e98c2c1502208f50a Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Thu Jan 6 10:09:59 2022 +0100 CAMEL-17422: Grammar --- .../main/docs/modules/eips/pages/choice-eip.adoc | 2 +- .../eips/pages/composed-message-processor.adoc | 6 +-- .../modules/eips/pages/dead-letter-channel.adoc | 2 +- .../main/docs/modules/eips/pages/split-eip.adoc | 34 ++++++------- .../docs/modules/languages/pages/ref-language.adoc | 2 +- .../modules/languages/pages/simple-language.adoc | 2 +- .../org/apache/camel/model/onException.json | 4 +- .../resources/org/apache/camel/model/split.json | 8 +-- .../camel/builder/AggregationStrategies.java | 2 +- .../camel/builder/DefaultErrorHandlerBuilder.java | 4 +- .../apache/camel/model/OnExceptionDefinition.java | 4 +- .../org/apache/camel/model/SplitDefinition.java | 58 +++++++++++----------- .../java/org/apache/camel/processor/Splitter.java | 2 +- .../camel/issues/SplitPropertiesFileIssueTest.java | 2 +- .../apache/camel/issues/XPathSplitStreamTest.java | 4 +- .../camel/processor/SplitAggregateInOutTest.java | 12 ++--- .../camel/processor/SplitSubUnitOfWorkTest.java | 2 +- .../apache/camel/processor/SplitterPojoTest.java | 4 +- .../SplitterStreamingErrorHandlingTest.java | 2 +- .../SplitterStreamingWithErrorHandlerTest.java | 2 +- .../camel/processor/SplitterWithXqureyTest.java | 2 +- .../org/apache/camel/util/StringQuoteHelper.java | 8 +-- 22 files changed, 84 insertions(+), 84 deletions(-) diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc index 0d1cab4..2f45113 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc @@ -130,7 +130,7 @@ You only need to use `.endChoice()` when using certain xref:eips:enterprise-integration-patterns.adoc[EIP]s which often have additional methods to configure or as part of the EIP itself. For example the xref:split-eip.adoc[Split] EIP has a sub-route which denotes the -routing of each _splitted_ message. You would also have to use +routing of each _split_ message. You would also have to use `.endChoice()` to indicate the end of the sub-route and to return to the Choice EIP. diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc index 6d2dd8a..8f55d39 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/composed-message-processor.adoc @@ -33,12 +33,12 @@ a single response message via the custom `AggregationStrategy` (`MyOrderStrategy // own strategy with the class MyOrderStrategy. from("direct:start") .split(body().tokenize("@"), new MyOrderStrategy()) - // each splitted message is then send to this bean where we can process it + // each split message is then send to this bean where we can process it .to("bean:MyOrderService?method=handleOrder") // this is important to end the splitter route as we do not want to do more routing - // on each splitted message + // on each split message .end() - // after we have splitted and handled each message we want to send a single combined + // after we have split and handled each message we want to send a single combined // response back to the original caller, so we let this bean build it for us // this bean will receive the result of the aggregate strategy: MyOrderStrategy .to("bean:MyOrderService?method=buildCombinedResponse") diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc index 9cb6a64..b8872c2 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/dead-letter-channel.adoc @@ -215,7 +215,7 @@ The original input means the input message that are bounded by the current unit A unit of work typically spans one route, or multiple routes if they are connected using internal endpoints such as direct or seda. When messages are passed via external endpoints such as JMS or HTT then the consumer will create a new unit of work, with the message it received as input as the original input. Also, some EIP patterns such as splitter, multicast, will create a new unit of work boundary for the messages in -their sub-route (i.e. the _splitted_ message); however these EIPs have an option named `shareUnitOfWork` which allows +their sub-route (i.e. the _split_ message); however these EIPs have an option named `shareUnitOfWork` which allows combining with the parent unit of work and ends up usinguse the parent original message. diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/split-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/split-eip.adoc index f50a369..44839eb 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/split-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/split-eip.adoc @@ -27,7 +27,7 @@ The following exchange properties are set on each `Exchange` that are split: |======================================================================= | Property | Type | Description | `CamelSplitIndex` | `int` | A split counter that increases for each Exchange being split. The counter starts from 0. -| `CamelSplitSize` | `int` | The total number of Exchanges that was splitted. +| `CamelSplitSize` | `int` | The total number of Exchanges that was split. This property is not applied for stream based splitting, except for the very last message because then Camel knows the total size. | `CamelSplitComplete` | `boolean` | Whether this Exchange is the last. |======================================================================= @@ -152,7 +152,7 @@ In XML you use xref:components:languages:simple-language.adoc[Simple] to refer t === Splitting with parallel processing -You can enable parallel processing with Split EIP so each splitted message +You can enable parallel processing with Split EIP so each split message is processed by its own thread in parallel. The example below enabled parallel mode: @@ -225,7 +225,7 @@ You can control this by using a custom `AggregationStrategy`. === Aggregating -The `AggregationStrategy` is used for aggregating all the splitted exchanges together +The `AggregationStrategy` is used for aggregating all the split exchanges together as a single response exchange, that becomes the outgoing exchange after the Split EIP block. The example now aggregates with the `MyAggregationStrategy` class: @@ -416,7 +416,7 @@ In XML the route would be as follows: This will split the file using the tag name of the child nodes (more precisely speaking, the local name of the element without its namespace prefix if any), which mean it will grab the content between the `<order>` and `</order>` tags (incl. the tags). -So for example a splitted message would be structuted as follows: +So for example a split message would be structured as follows: [source,xml] ---- @@ -579,7 +579,7 @@ The output when using the group option is always a `java.lang.String` type. === Split and aggregate example -This sample shows how you can split an Exchange, process each splitted message, +This sample shows how you can split an Exchange, process each split message, aggregate and return a combined response to the original caller. The route below illustrates this and how the split supports a custom `AggregationStrategy` @@ -588,18 +588,18 @@ to build up the combined response message. [source,java] ---- // this routes starts from the direct:start endpoint -// the body is then splitted based on @ separator +// the body is then split based on @ separator // the splitter in Camel supports InOut as well and for that we need // to be able to aggregate what response we need to send back, so we provide our // own strategy with the class MyOrderStrategy. from("direct:start") .split(body().tokenize("@"), new MyOrderStrategy()) - // each splitted message is then send to this bean where we can process it + // each split message is then send to this bean where we can process it .to("bean:MyOrderService?method=handleOrder") // this is important to end the splitter route as we do not want to do more routing - // on each splitted message + // on each split message .end() - // after we have splitted and handled each message we want to send a single combined + // after we have split and handled each message we want to send a single combined // response back to the original caller, so we let this bean build it for us // this bean will receive the result of the aggregate strategy: MyOrderStrategy .to("bean:MyOrderService?method=buildCombinedResponse") @@ -640,7 +640,7 @@ response can be returned to the waiting caller. ---- /** * This is our own order aggregation strategy where we can control - * how each splitted message should be combined. As we do not want to + * how each split message should be combined. As we do not want to * loos any message we copy from the new to the old to preserve the * order lines as long we process them */ @@ -693,10 +693,10 @@ Response to caller: Response[(id=1,item=A);(id=2,item=B);(id=3,item=C)] The Splitter will by default continue to process the entire Exchange even in case of one of the -splitted message will throw an exception during routing. +split message will throw an exception during routing. For example if you have an Exchange with 1000 rows that you split. -During processing of these splitted messages an exception is thrown at the 17th. +During processing of these split messages an exception is thrown at the 17th. What Camel does by default is to process the remainder 983 messages. You have the chance to deal with the exception when aggregating using an `AggregationStrategy`. @@ -754,7 +754,7 @@ errorHandler(deadLetterChannel("mock:dead").useOriginalMessage() from("direct:start") .to("mock:a") // share unit of work in the splitter, which tells Camel to propagate failures from - // processing the splitted messages back to the result of the splitter, which allows + // processing the split messages back to the result of the splitter, which allows // it to act as a combined unit of work .split(body().tokenize(",")).shareUnitOfWork() .to("mock:b") @@ -772,10 +772,10 @@ What would happen is that in case there is an exception thrown during splitting the error handler will kick in (yes error handling still applies for the sub messages). The error handler in this example is configured to retry up till 3 times. -And when a splitted message fails all redelivery attempts (its exhausted), +And when a split message fails all redelivery attempts (its exhausted), then this message is *not* moved into that dead letter queue. -The reason is that we have shared the unit of work, so the splitted message will report the error on the shared unit of work. +The reason is that we have shared the unit of work, so the split message will report the error on the shared unit of work. When the Splitter is done, it checks the state of the shared unit of work and checks if any errors occurred. If an error occurred it will set the exception on the `Exchange` and mark it for rollback. @@ -798,7 +798,7 @@ Using this from XML DSL is just as easy as all you have to set is the `shareUnit <from uri="direct:start"/> <to uri="mock:a"/> <!-- share unit of work in the splitter, which tells Camel to propagate failures from - processing the splitted messages back to the result of the splitter, which allows + processing the split messages back to the result of the splitter, which allows it to act as a combined unit of work --> <split shareUnitOfWork="true"> <tokenize token=","/> @@ -808,7 +808,7 @@ Using this from XML DSL is just as easy as all you have to set is the `shareUnit <to uri="mock:result"/> </route> - <!-- route for processing each splitted line --> + <!-- route for processing each split line --> <route> <from uri="direct:line"/> <to uri="log:line"/> diff --git a/core/camel-core-languages/src/main/docs/modules/languages/pages/ref-language.adoc b/core/camel-core-languages/src/main/docs/modules/languages/pages/ref-language.adoc index d134218..026a886 100644 --- a/core/camel-core-languages/src/main/docs/modules/languages/pages/ref-language.adoc +++ b/core/camel-core-languages/src/main/docs/modules/languages/pages/ref-language.adoc @@ -41,7 +41,7 @@ expression using `<ref>` like: ---- in this case, the message coming from the seda:a -endpoint will be splitted using a custom +endpoint will be split using a custom `Expression` which has the id `myExpression` in the xref:manual:ROOT:registry.adoc[Registry]. diff --git a/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc b/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc index e42fa23..08316e8 100644 --- a/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc +++ b/core/camel-core-languages/src/main/docs/modules/languages/pages/simple-language.adoc @@ -201,7 +201,7 @@ _max_ (excluded) |collate(group) |List |The collate function iterates the message body and groups the data into sub lists of specified size. This can be used with the Splitter EIP to split a message body and group/batch -the splitted sub message into a group of N sub lists. This method works +the split sub message into a group of N sub lists. This method works similar to the collate method in Groovy. |skip(number) |Iterator |The skip function iterates the message body and skips diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/onException.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/onException.json index bbfc73d..730af6b 100644 --- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/onException.json +++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/onException.json @@ -21,8 +21,8 @@ "continued": { "kind": "expression", "displayName": "Continued", "required": false, "type": "object", "javaType": "org.apache.camel.model.ExpressionSubElementDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "joor", "jsonpath", "language", "method", "mvel", "ognl", "ref", "simple", "spel", "tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "asPredicate": true, "descrip [...] "onRedeliveryRef": { "kind": "attribute", "displayName": "On Redelivery Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that should be processed <b>before a redelivery attempt. <p\/> Can be used to change the org.apache.camel.Exchange <b>before its being redelivered." }, "onExceptionOccurredRef": { "kind": "attribute", "displayName": "On Exception Occurred Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to a processor that should be processed <b>just after an exception occurred. Can be used to perform custom logging about the occurred exception at the exact time it happened. <p\/> Important: Any exception thrown from this processor wi [...] - "useOriginalMessage": { "kind": "attribute", "displayName": "Use Original Message", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message (original body and headers) when an org.apache.camel.Exchange is moved to the dead letter queue. <p\/> <b>Notice: this only applies when all redeliveries attempt have failed and the o [...] - "useOriginalBody": { "kind": "attribute", "displayName": "Use Original Body", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message body (original body only) when an org.apache.camel.Exchange is moved to the dead letter queue. <p\/> <b>Notice: this only applies when all redeliveries attempt have failed and the org.apach [...] + "useOriginalMessage": { "kind": "attribute", "displayName": "Use Original Message", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message (original body and headers) when an org.apache.camel.Exchange is moved to the dead letter queue. <p\/> <b>Notice: this only applies when all redeliveries attempt have failed and the o [...] + "useOriginalBody": { "kind": "attribute", "displayName": "Use Original Body", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will use the original input org.apache.camel.Message body (original body only) when an org.apache.camel.Exchange is moved to the dead letter queue. <p\/> <b>Notice: this only applies when all redeliveries attempt have failed and the org.apach [...] "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, "description": { "kind": "element", "displayName": "Description", "required": false, "type": "object", "javaType": "org.apache.camel.model.DescriptionDefinition", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the description of this node" } } diff --git a/core/camel-core-model/src/generated/resources/org/apache/camel/model/split.json b/core/camel-core-model/src/generated/resources/org/apache/camel/model/split.json index 1303f3b..947aa58 100644 --- a/core/camel-core-model/src/generated/resources/org/apache/camel/model/split.json +++ b/core/camel-core-model/src/generated/resources/org/apache/camel/model/split.json @@ -14,16 +14,16 @@ "properties": { "expression": { "kind": "expression", "displayName": "Expression", "required": true, "type": "object", "javaType": "org.apache.camel.model.language.ExpressionDefinition", "oneOf": [ "constant", "csimple", "datasonnet", "exchangeProperty", "groovy", "header", "hl7terser", "joor", "jsonpath", "language", "method", "mvel", "ognl", "ref", "simple", "spel", "tokenize", "xpath", "xquery", "xtokenize" ], "deprecated": false, "autowired": false, "secret": false, "description": "Expression of [...] "delimiter": { "kind": "attribute", "displayName": "Delimiter", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": ",", "description": "Delimiter used in splitting messages. Can be turned off using the value <tt>false. <p\/> The default value is ," }, - "parallelProcessing": { "kind": "attribute", "displayName": "Parallel Processing", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then processing each splitted messages occurs concurrently. Note the caller thread will still wait until all messages has been fully processed, before it continues. Its only processing the sub messages from the splitter which [...] - "strategyRef": { "kind": "attribute", "displayName": "Strategy Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it unchanged). You can also use a POJO a [...] + "parallelProcessing": { "kind": "attribute", "displayName": "Parallel Processing", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then processing each split messages occurs concurrently. Note the caller thread will still wait until all messages has been fully processed, before it continues. Its only processing the sub messages from the splitter which hap [...] + "strategyRef": { "kind": "attribute", "displayName": "Strategy Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets a reference to the AggregationStrategy to be used to assemble the replies from the split messages, into a single outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it unchanged). You can also use a POJO as t [...] "strategyMethodName": { "kind": "attribute", "displayName": "Strategy Method Name", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy." }, "strategyMethodAllowNull": { "kind": "attribute", "displayName": "Strategy Method Allow Null", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If this option is false then the aggregate method is not used if there was no data to enrich. If this option is true then null values is used as the oldExchange (when no data to enrich), when using POJOs as the AggregationStr [...] "executorServiceRef": { "kind": "attribute", "displayName": "Executor Service Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Refers to a custom Thread Pool to be used for parallel processing. Notice if you set this option, then parallel processing is automatic implied, and you do not have to enable that option as well." }, - "streaming": { "kind": "attribute", "displayName": "Streaming", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is processed one by one. This reduces memory usage as the splitter do not split all the messages first, but then we do not know the total size, and t [...] + "streaming": { "kind": "attribute", "displayName": "Streaming", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "When in streaming mode, then the splitter splits the original message on-demand, and each split message is processed one by one. This reduces memory usage as the splitter do not split all the messages first, but then we do not know the total size, and ther [...] "stopOnException": { "kind": "attribute", "displayName": "Stop On Exception", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Will now stop further processing if an exception or failure occurred during processing of an org.apache.camel.Exchange and the caused exception will be thrown. <p\/> Will also stop if processing the exchange failed (has a fault message) or an [...] "timeout": { "kind": "attribute", "displayName": "Timeout", "required": false, "type": "duration", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "0", "description": "Sets a total timeout specified in millis, when using parallel processing. If the Splitter hasn't been able to split and process all the sub messages within the given timeframe, then the timeout triggers and the Splitter breaks out and continues. Notice if you pr [...] "onPrepareRef": { "kind": "attribute", "displayName": "On Prepare Ref", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Uses the Processor when preparing the org.apache.camel.Exchange to be send. This can be used to deep-clone messages that should be send, or any custom logic needed before the exchange is send." }, - "shareUnitOfWork": { "kind": "attribute", "displayName": "Share Unit Of Work", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Splitter will by default not share unit of work between the parent exchange and each splitted exchange. This means each splitted exchange has its own in [...] + "shareUnitOfWork": { "kind": "attribute", "displayName": "Share Unit Of Work", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. Splitter will by default not share unit of work between the parent exchange and each split exchange. This means each split exchange has its own individu [...] "parallelAggregate": { "kind": "attribute", "displayName": "Parallel Aggregate", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice that this would require the implementation of AggregationStrategy to be implemented as thread-safe. By default this is false meaning that Camel [...] "stopOnAggregateException": { "kind": "attribute", "displayName": "Stop On Aggregate Exception", "required": false, "type": "boolean", "javaType": "java.lang.Boolean", "deprecated": true, "deprecationNote": "Has no effect in Camel 3.x", "autowired": false, "secret": false, "defaultValue": false, "description": "If enabled, unwind exceptions occurring at aggregation time to the error handler when parallelProcessing is used. The default value is <code>false for the sake of backward com [...] "id": { "kind": "attribute", "displayName": "Id", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets the id of this node" }, diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/AggregationStrategies.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/AggregationStrategies.java index 34489f1..1e48e93 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/AggregationStrategies.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/AggregationStrategies.java @@ -72,7 +72,7 @@ public final class AggregationStrategies { /** * Use the original exchange. * - * @param propagateException whether to propgate exception if errors was thrown during processing splitted messages. + * @param propagateException whether to propgate exception if errors was thrown during processing split messages. * @see org.apache.camel.processor.aggregate.UseOriginalAggregationStrategy */ public static AggregationStrategy useOriginal(boolean propagateException) { diff --git a/core/camel-core-model/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java b/core/camel-core-model/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java index 400a536..abb3235 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/builder/DefaultErrorHandlerBuilder.java @@ -353,7 +353,7 @@ public class DefaultErrorHandlerBuilder extends ErrorHandlerBuilderSupport imple * are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints * such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as * the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary - * for the messages in their sub-route (eg the splitted message); however these EIPs have an option named + * for the messages in their sub-route (eg the split message); however these EIPs have an option named * <tt>shareUnitOfWork</tt> which allows to combine with the parent unit of work in regard to error handling and * therefore use the parent original message. * <p/> @@ -390,7 +390,7 @@ public class DefaultErrorHandlerBuilder extends ErrorHandlerBuilderSupport imple * are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints * such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as * the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary - * for the messages in their sub-route (eg the splitted message); however these EIPs have an option named + * for the messages in their sub-route (eg the split message); however these EIPs have an option named * <tt>shareUnitOfWork</tt> which allows to combine with the parent unit of work in regard to error handling and * therefore use the parent original message. * <p/> diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/OnExceptionDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/OnExceptionDefinition.java index 6b614b5..1c45c68 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/OnExceptionDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/OnExceptionDefinition.java @@ -668,7 +668,7 @@ public class OnExceptionDefinition extends OutputDefinition<OnExceptionDefinitio * are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints * such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as * the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary - * for the messages in their sub-route (eg the splitted message); however these EIPs have an option named + * for the messages in their sub-route (eg the split message); however these EIPs have an option named * <tt>shareUnitOfWork</tt> which allows to combine with the parent unit of work in regard to error handling and * therefore use the parent original message. * <p/> @@ -705,7 +705,7 @@ public class OnExceptionDefinition extends OutputDefinition<OnExceptionDefinitio * are connected using internal endpoints such as direct or seda. When messages is passed via external endpoints * such as JMS or HTTP then the consumer will create a new unit of work, with the message it received as input as * the original input. Also some EIP patterns such as splitter, multicast, will create a new unit of work boundary - * for the messages in their sub-route (eg the splitted message); however these EIPs have an option named + * for the messages in their sub-route (eg the split message); however these EIPs have an option named * <tt>shareUnitOfWork</tt> which allows to combine with the parent unit of work in regard to error handling and * therefore use the parent original message. * <p/> diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java index 7a68864..16296b9 100644 --- a/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java +++ b/core/camel-core-model/src/main/java/org/apache/camel/model/SplitDefinition.java @@ -124,9 +124,9 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single - * outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter - * (leave it unchanged). You can also use a POJO as the AggregationStrategy + * Sets the AggregationStrategy to be used to assemble the replies from the split messages, into a single outgoing + * message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it + * unchanged). You can also use a POJO as the AggregationStrategy */ public SplitDefinition aggregationStrategy(AggregationStrategy aggregationStrategy) { setAggregationStrategy(aggregationStrategy); @@ -134,9 +134,9 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single - * outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter - * (leave it unchanged). You can also use a POJO as the AggregationStrategy + * Sets the AggregationStrategy to be used to assemble the replies from the split messages, into a single outgoing + * message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it + * unchanged). You can also use a POJO as the AggregationStrategy */ public SplitDefinition aggregationStrategy(Supplier<AggregationStrategy> aggregationStrategy) { setAggregationStrategy(aggregationStrategy.get()); @@ -144,7 +144,7 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages, into a + * Sets a reference to the AggregationStrategy to be used to assemble the replies from the split messages, into a * single outgoing message from the Splitter. By default Camel will use the original incoming message to the * splitter (leave it unchanged). You can also use a POJO as the AggregationStrategy * <p/> @@ -214,8 +214,8 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * If enabled then processing each splitted messages occurs concurrently. Note the caller thread will still wait - * until all messages has been fully processed, before it continues. Its only processing the sub messages from the + * If enabled then processing each split messages occurs concurrently. Note the caller thread will still wait until + * all messages has been fully processed, before it continues. Its only processing the sub messages from the * splitter which happens concurrently. * * @return the builder @@ -225,8 +225,8 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * If enabled then processing each splitted messages occurs concurrently. Note the caller thread will still wait - * until all messages has been fully processed, before it continues. Its only processing the sub messages from the + * If enabled then processing each split messages occurs concurrently. Note the caller thread will still wait until + * all messages has been fully processed, before it continues. Its only processing the sub messages from the * splitter which happens concurrently. * * @return the builder @@ -236,8 +236,8 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * If enabled then processing each splitted messages occurs concurrently. Note the caller thread will still wait - * until all messages has been fully processed, before it continues. Its only processing the sub messages from the + * If enabled then processing each split messages occurs concurrently. Note the caller thread will still wait until + * all messages has been fully processed, before it continues. Its only processing the sub messages from the * splitter which happens concurrently. * * @return the builder @@ -326,17 +326,17 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is + * When in streaming mode, then the splitter splits the original message on-demand, and each split message is * processed one by one. This reduces memory usage as the splitter do not split all the messages first, but then we * do not know the total size, and therefore the {@link org.apache.camel.Exchange#SPLIT_SIZE} is empty. * <p/> * In non-streaming mode (default) the splitter will split each message first, to know the total size, and then - * process each message one by one. This requires to keep all the splitted messages in memory and therefore requires + * process each message one by one. This requires to keep all the split messages in memory and therefore requires * more memory. The total size is provided in the {@link org.apache.camel.Exchange#SPLIT_SIZE} header. * <p/> * The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies * out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the - * messages was splitted. + * messages was split. * * @return the builder */ @@ -345,17 +345,17 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is + * When in streaming mode, then the splitter splits the original message on-demand, and each split message is * processed one by one. This reduces memory usage as the splitter do not split all the messages first, but then we * do not know the total size, and therefore the {@link org.apache.camel.Exchange#SPLIT_SIZE} is empty. * <p/> * In non-streaming mode (default) the splitter will split each message first, to know the total size, and then - * process each message one by one. This requires to keep all the splitted messages in memory and therefore requires + * process each message one by one. This requires to keep all the split messages in memory and therefore requires * more memory. The total size is provided in the {@link org.apache.camel.Exchange#SPLIT_SIZE} header. * <p/> * The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies * out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the - * messages was splitted. + * messages was split. * * @return the builder */ @@ -364,17 +364,17 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * When in streaming mode, then the splitter splits the original message on-demand, and each splitted message is + * When in streaming mode, then the splitter splits the original message on-demand, and each split message is * processed one by one. This reduces memory usage as the splitter do not split all the messages first, but then we * do not know the total size, and therefore the {@link org.apache.camel.Exchange#SPLIT_SIZE} is empty. * <p/> * In non-streaming mode (default) the splitter will split each message first, to know the total size, and then - * process each message one by one. This requires to keep all the splitted messages in memory and therefore requires + * process each message one by one. This requires to keep all the split messages in memory and therefore requires * more memory. The total size is provided in the {@link org.apache.camel.Exchange#SPLIT_SIZE} header. * <p/> * The streaming mode also affects the aggregation behavior. If enabled then Camel will process replies * out-of-order, eg in the order they come back. If disabled, Camel will process replies in the same order as the - * messages was splitted. + * messages was split. * * @return the builder */ @@ -509,7 +509,7 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer /** * Shares the {@link org.apache.camel.spi.UnitOfWork} with the parent and each of the sub messages. Splitter will by - * default not share unit of work between the parent exchange and each splitted exchange. This means each splitted + * default not share unit of work between the parent exchange and each split exchange. This means each split * exchange has its own individual unit of work. * * @return the builder. @@ -520,7 +520,7 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer /** * Shares the {@link org.apache.camel.spi.UnitOfWork} with the parent and each of the sub messages. Splitter will by - * default not share unit of work between the parent exchange and each splitted exchange. This means each splitted + * default not share unit of work between the parent exchange and each split exchange. This means each split * exchange has its own individual unit of work. * * @return the builder. @@ -531,7 +531,7 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer /** * Shares the {@link org.apache.camel.spi.UnitOfWork} with the parent and each of the sub messages. Splitter will by - * default not share unit of work between the parent exchange and each splitted exchange. This means each splitted + * default not share unit of work between the parent exchange and each split exchange. This means each split * exchange has its own individual unit of work. * * @return the builder. @@ -566,9 +566,9 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * Sets the AggregationStrategy to be used to assemble the replies from the splitted messages, into a single - * outgoing message from the Splitter. By default Camel will use the original incoming message to the splitter - * (leave it unchanged). You can also use a POJO as the AggregationStrategy + * Sets the AggregationStrategy to be used to assemble the replies from the split messages, into a single outgoing + * message from the Splitter. By default Camel will use the original incoming message to the splitter (leave it + * unchanged). You can also use a POJO as the AggregationStrategy */ public void setAggregationStrategy(AggregationStrategy aggregationStrategy) { this.aggregationStrategy = aggregationStrategy; @@ -631,7 +631,7 @@ public class SplitDefinition extends OutputExpressionNode implements ExecutorSer } /** - * Sets a reference to the AggregationStrategy to be used to assemble the replies from the splitted messages, into a + * Sets a reference to the AggregationStrategy to be used to assemble the replies from the split messages, into a * single outgoing message from the Splitter. By default Camel will use the original incoming message to the * splitter (leave it unchanged). You can also use a POJO as the AggregationStrategy */ diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/Splitter.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/Splitter.java index 49be665..5383bc9 100644 --- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/Splitter.java +++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/Splitter.java @@ -322,7 +322,7 @@ public class Splitter extends MulticastProcessor implements AsyncProcessor, Trac answer.setExchangeId(exchange.getExchangeId()); } if (exchange.getContext().isMessageHistory()) { - // we do not want to copy the message history for splitted sub-messages + // we do not want to copy the message history for split sub-messages answer.removeProperty(ExchangePropertyKey.MESSAGE_HISTORY); } return answer; diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java index 0d515f8..1c53504 100644 --- a/core/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/issues/SplitPropertiesFileIssueTest.java @@ -71,7 +71,7 @@ public class SplitPropertiesFileIssueTest extends ContextTestSupport { // now we use our own expressions to split the file as we like it // what we return is just the list of the two Camel Message objects - // which contains the splitted data (our way) + // which contains the split data (our way) List<Message> answer = new ArrayList<>(); answer.add(msg1); answer.add(msg2); diff --git a/core/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java b/core/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java index 73dc032..71683e4 100644 --- a/core/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/issues/XPathSplitStreamTest.java @@ -48,7 +48,7 @@ public class XPathSplitStreamTest extends ContextTestSupport { @Test public void testXPathSplitStream() throws Exception { - MockEndpoint mock = getMockEndpoint("mock:splitted"); + MockEndpoint mock = getMockEndpoint("mock:split"); mock.expectedMessageCount(size); mock.expectsNoDuplicates().body(); @@ -66,7 +66,7 @@ public class XPathSplitStreamTest extends ContextTestSupport { from(fileUri("?initialDelay=0&delay=10")) // set documentType to org.xml.sax.InputSource then Camel // will use SAX to split the file - .split(personXPath).streaming().to("mock:splitted"); + .split(personXPath).streaming().to("mock:split"); // END SNIPPET: e1 } }; diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java index c541042..16d3e5f 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitAggregateInOutTest.java @@ -61,21 +61,21 @@ public class SplitAggregateInOutTest extends ContextTestSupport { public void configure() throws Exception { // START SNIPPET: e1 // this routes starts from the direct:start endpoint - // the body is then splitted based on @ separator + // the body is then split based on @ separator // the splitter in Camel supports InOut as well and for that we // need // to be able to aggregate what response we need to send back, // so we provide our // own strategy with the class MyOrderStrategy. from("direct:start").split(body().tokenize("@"), new MyOrderStrategy()) - // each splitted message is then send to this bean where we + // each split message is then send to this bean where we // can process it .to("bean:MyOrderService?method=handleOrder") // this is important to end the splitter route as we do not // want to do more routing - // on each splitted message + // on each split message .end() - // after we have splitted and handled each message we want + // after we have split and handled each message we want // to send a single combined // response back to the original caller, so we let this bean // build it for us @@ -113,8 +113,8 @@ public class SplitAggregateInOutTest extends ContextTestSupport { // START SNIPPET: e3 /** - * This is our own order aggregation strategy where we can control how each splitted message should be combined. As - * we do not want to loos any message we copy from the new to the old to preserve the order lines as long we process + * This is our own order aggregation strategy where we can control how each split message should be combined. As we + * do not want to loos any message we copy from the new to the old to preserve the order lines as long we process * them */ public static class MyOrderStrategy implements AggregationStrategy { diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkTest.java index 7efedcc..2a45bb8 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkTest.java @@ -75,7 +75,7 @@ public class SplitSubUnitOfWorkTest extends ContextTestSupport { from("direct:start").to("mock:a") // share unit of work in the splitter, which tells Camel to // propagate failures from - // processing the splitted messages back to the result of + // processing the split messages back to the result of // the splitter, which allows // it to act as a combined unit of work .split(body().tokenize(",")).shareUnitOfWork().to("mock:b").to("direct:line").end().to("mock:result"); diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java index c3c48e4..3f32b8a 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterPojoTest.java @@ -95,7 +95,7 @@ public class SplitterPojoTest extends ContextTestSupport { * The split body method returns something that is iteratable such as a java.util.List. * * @param body the payload of the incoming message - * @return a list containing each part splitted + * @return a list containing each part split */ public List<String> splitBody(String body) { // since this is based on an unit test you can of cause @@ -116,7 +116,7 @@ public class SplitterPojoTest extends ContextTestSupport { * * @param header the header of the incoming message with the name user * @param body the payload of the incoming message - * @return a list containing each part splitted + * @return a list containing each part split */ public List<Message> splitMessage(@Header(value = "user") String header, @Body String body, CamelContext camelContext) { // we can leverage the Parameter Binding Annotations diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingErrorHandlingTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingErrorHandlingTest.java index 3f8430f..836b1ee 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingErrorHandlingTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingErrorHandlingTest.java @@ -45,7 +45,7 @@ public class SplitterStreamingErrorHandlingTest extends ContextTestSupport { getMockEndpoint("mock:b").expectedBodiesReceived("A", "B", "D", "E"); getMockEndpoint("mock:result").expectedMessageCount(0); - // we do not stop on exception and thus the splitted message which + // we do not stop on exception and thus the split message which // failed // would be silently ignored so we can continue routing // you can always use a custom aggregation strategy to deal with errors diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingWithErrorHandlerTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingWithErrorHandlerTest.java index fc5970d..13413dd 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingWithErrorHandlerTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterStreamingWithErrorHandlerTest.java @@ -29,7 +29,7 @@ public class SplitterStreamingWithErrorHandlerTest extends ContextTestSupport { getMockEndpoint("mock:b").expectedMessageCount(0); getMockEndpoint("mock:error").expectedMessageCount(1); - // we do not stop on exception and thus the splitted message which + // we do not stop on exception and thus the split message which // failed // would be silently ignored so we can continue routing // you can always use a custom aggregation strategy to deal with errors diff --git a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java index 45d8634..609571f 100644 --- a/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/processor/SplitterWithXqureyTest.java @@ -53,7 +53,7 @@ public class SplitterWithXqureyTest extends ContextTestSupport { for (Exchange exchange : result.getExchanges()) { String message = exchange.getIn().getBody(String.class); log.debug("The message is " + message); - assertEquals(0, message.indexOf("<other"), "The splitted message should start with <other"); + assertEquals(0, message.indexOf("<other"), "The split message should start with <other"); } } diff --git a/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java b/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java index d45e2af..8fdf344 100644 --- a/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java +++ b/core/camel-util/src/main/java/org/apache/camel/util/StringQuoteHelper.java @@ -59,11 +59,11 @@ public final class StringQuoteHelper { * Though this method does not support double quoting values. A quoted value must start with the same start and * ending quote, which is either a single quote or double quote value. * <p/> - * Will <i>trim</i> each splitted value by default. + * Will <i>trim</i> each split value by default. * * @param input the input * @param separator the separator char to split the input, for example a comma. - * @return the input splitted, or <tt>null</tt> if the input is null. + * @return the input split, or <tt>null</tt> if the input is null. */ public static String[] splitSafeQuote(String input, char separator) { return splitSafeQuote(input, separator, true); @@ -77,8 +77,8 @@ public final class StringQuoteHelper { * * @param input the input * @param separator the separator char to split the input, for example a comma. - * @param trim whether to trim each splitted value - * @return the input splitted, or <tt>null</tt> if the input is null. + * @param trim whether to trim each split value + * @return the input split, or <tt>null</tt> if the input is null. */ public static String[] splitSafeQuote(String input, char separator, boolean trim) { if (input == null) {