camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9488: Camel script - Add missing languages.
Date Sat, 09 Jan 2016 08:29:51 GMT
Repository: camel
Updated Branches:
  refs/heads/master 1962c830c -> 142b90de1


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/142b90de
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/142b90de
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/142b90de

Branch: refs/heads/master
Commit: 142b90de1a0b15ad4fbba7070f0b95911e2e03e7
Parents: 1962c83
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Jan 9 09:22:53 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Jan 9 09:26:18 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/142b90de/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/142b90de/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/142b90de/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/142b90de/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/142b90de/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