You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/12/14 15:20:26 UTC

[camel-k-runtime] branch main updated: Update javascript.adoc (#759)

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-k-runtime.git


The following commit(s) were added to refs/heads/main by this push:
     new 59f5d52  Update javascript.adoc (#759)
59f5d52 is described below

commit 59f5d52dfdc915f81ba5306ddc08a8eeb8c48c61
Author: Hugo Guerrero <10...@users.noreply.github.com>
AuthorDate: Tue Dec 14 10:14:27 2021 -0500

    Update javascript.adoc (#759)
    
    Processor declaration is not required anymore
---
 docs/modules/languages/pages/javascript.adoc | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/docs/modules/languages/pages/javascript.adoc b/docs/modules/languages/pages/javascript.adoc
index 597825f..e94f33e 100644
--- a/docs/modules/languages/pages/javascript.adoc
+++ b/docs/modules/languages/pages/javascript.adoc
@@ -10,14 +10,12 @@ An integration written in JavaScript looks very similar to a Java one:
 [source,js]
 .hello.js
 ----
-const Processor = Java.extend(Java.type("org.apache.camel.Processor"));
-
 function proc(e) {
     e.getIn().setBody('Hello Camel K!')
 }
 
 from('timer:tick')
-    .process(new Processor(proc))
+    .process(proc)
     .to('log:info')
 ----