camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acosent...@apache.org
Subject [2/2] camel git commit: CAMEL-9488: Camel script - Add missing languages.
Date Thu, 17 Mar 2016 08:36:25 GMT
CAMEL-9488: Camel script - Add missing languages.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/1cc925e7
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1cc925e7
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1cc925e7

Branch: refs/heads/camel-2.16.x
Commit: 1cc925e761af8de6e73472139cf3014b1580d8ab
Parents: 6699141
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Jan 9 09:22:53 2016 +0100
Committer: Andrea Cosentino <ancosen@gmail.com>
Committed: Thu Mar 17 09:33:33 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/builder/script/JavaScriptLanguage.java | 4 ++--
 .../main/java/org/apache/camel/builder/script/PhpLanguage.java   | 4 ++--
 .../java/org/apache/camel/builder/script/PythonLanguage.java     | 4 ++--
 .../main/java/org/apache/camel/builder/script/RubyLanguage.java  | 4 ++--
 .../java/org/apache/camel/builder/script/RubyScriptTextTest.java | 4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1cc925e7/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
b/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
index eafbe22..e6a7d80 100644
--- a/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/JavaScriptLanguage.java
@@ -25,7 +25,7 @@ public class JavaScriptLanguage extends LanguageSupport {
 
     @Override
     public Predicate createPredicate(String predicate) {
-        Language language = getCamelContext().resolveLanguage("js");
+        Language language = new ScriptLanguageResolver().resolveLanguage("js", getCamelContext());
         if (language != null) {
             return language.createPredicate(predicate);
         } else {
@@ -35,7 +35,7 @@ public class JavaScriptLanguage extends LanguageSupport {
 
     @Override
     public Expression createExpression(String expression) {
-        Language language = getCamelContext().resolveLanguage("js");
+        Language language = new ScriptLanguageResolver().resolveLanguage("js", getCamelContext());
         if (language != null) {
             return language.createExpression(expression);
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/1cc925e7/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
b/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
index be2a5ce..2cd015a 100644
--- a/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/PhpLanguage.java
@@ -25,7 +25,7 @@ public class PhpLanguage extends LanguageSupport {
 
     @Override
     public Predicate createPredicate(String predicate) {
-        Language language = getCamelContext().resolveLanguage("php");
+        Language language = new ScriptLanguageResolver().resolveLanguage("php", getCamelContext());
         if (language != null) {
             return language.createPredicate(predicate);
         } else {
@@ -35,7 +35,7 @@ public class PhpLanguage extends LanguageSupport {
 
     @Override
     public Expression createExpression(String expression) {
-        Language language = getCamelContext().resolveLanguage("php");
+        Language language = new ScriptLanguageResolver().resolveLanguage("php", getCamelContext());
         if (language != null) {
             return language.createExpression(expression);
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/1cc925e7/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
b/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
index 9dfb288..57bf701 100644
--- a/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/PythonLanguage.java
@@ -25,7 +25,7 @@ public class PythonLanguage extends LanguageSupport {
 
     @Override
     public Predicate createPredicate(String predicate) {
-        Language language = getCamelContext().resolveLanguage("python");
+        Language language = new ScriptLanguageResolver().resolveLanguage("python", getCamelContext());
         if (language != null) {
             return language.createPredicate(predicate);
         } else {
@@ -35,7 +35,7 @@ public class PythonLanguage extends LanguageSupport {
 
     @Override
     public Expression createExpression(String expression) {
-        Language language = getCamelContext().resolveLanguage("python");
+        Language language = new ScriptLanguageResolver().resolveLanguage("python", getCamelContext());
         if (language != null) {
             return language.createExpression(expression);
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/1cc925e7/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
b/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
index 5f95a88..5e0debc 100644
--- a/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
+++ b/components/camel-script/src/main/java/org/apache/camel/builder/script/RubyLanguage.java
@@ -25,7 +25,7 @@ public class RubyLanguage extends LanguageSupport {
 
     @Override
     public Predicate createPredicate(String predicate) {
-        Language language = getCamelContext().resolveLanguage("jruby");
+        Language language = new ScriptLanguageResolver().resolveLanguage("jruby", getCamelContext());
         if (language != null) {
             return language.createPredicate(predicate);
         } else {
@@ -35,7 +35,7 @@ public class RubyLanguage extends LanguageSupport {
 
     @Override
     public Expression createExpression(String expression) {
-        Language language = getCamelContext().resolveLanguage("jruby");
+        Language language = new ScriptLanguageResolver().resolveLanguage("jruby", getCamelContext());
         if (language != null) {
             return language.createExpression(expression);
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/1cc925e7/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
----------------------------------------------------------------------
diff --git a/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
b/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
index 6bfb354..b340092 100755
--- a/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
+++ b/components/camel-script/src/test/java/org/apache/camel/builder/script/RubyScriptTextTest.java
@@ -54,7 +54,7 @@ public class RubyScriptTextTest extends CamelTestSupport {
             template.sendBody("seda:jruby", "BODY" + i);
         }
 
-        assertMockEndpointsSatisfied(5, TimeUnit.SECONDS);
+        assertMockEndpointsSatisfied(10, TimeUnit.SECONDS);
     }
 
     @Test
@@ -77,6 +77,6 @@ public class RubyScriptTextTest extends CamelTestSupport {
             template.sendBody("seda:jruby", "BODY" + i);
         }
 
-        assertMockEndpointsSatisfied(5, TimeUnit.SECONDS);
+        assertMockEndpointsSatisfied(10, TimeUnit.SECONDS);
     }
 }


Mime
View raw message