This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new d073f429221 Update processor.adoc d073f429221 is described below commit d073f429221ac9909e6137efc1cda9e613dfeedc Author: Michael R <mich...@rambichler.at> AuthorDate: Thu Sep 22 15:04:20 2022 +0200 Update processor.adoc minor error in documentation as discussed in us...@camel.apache.org mailinglist --- docs/user-manual/modules/ROOT/pages/processor.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/user-manual/modules/ROOT/pages/processor.adoc b/docs/user-manual/modules/ROOT/pages/processor.adoc index 34ac6b07a5d..d0d10d3d37a 100644 --- a/docs/user-manual/modules/ROOT/pages/processor.adoc +++ b/docs/user-manual/modules/ROOT/pages/processor.adoc @@ -25,7 +25,7 @@ Then you can easily call this processor from a Java such as: [source,java] ---- -from("activemq:myQueue").process(MyProcessor.class); +from("activemq:myQueue").process(new MyProcessor()); ---- Notice that the processor is referred to by the class type `MyProcessor.class` in the route. @@ -81,11 +81,11 @@ from("activemq:myQueue").process("#class:com.acme.MyProcessor"); NOTE: For more details about the `#class:` prefix (and others) then see xref:property-binding.adoc[Property Binding]. -However in Java DSL you would often use the type safe way and provide the class type directly as previously shown: +However in Java DSL you would often use the type safe way and instantiate the Processor directly as previously shown: [source,java] ---- -from("activemq:myQueue").process(MyProcessor.class); +from("activemq:myQueue").process(new MyProcessor()); ----