[camel] branch camel-2.22.x updated (29641eb -> cd6871f)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[camel] branch camel-2.22.x updated (29641eb -> cd6871f)

davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a change to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 29641eb  CAMEL-12656: Fixed root span id for multiple routes. (#2448)
     new 48f8778  CAMEL-12705: Added unit test to reproduce the issue, ignored until fixed.
     new f9de67b  CAMEL-12705: Fixed camel-catalog syntax parser issue with hostname and dots such as when parsing the netty4-http endpoints.
     new cd6871f  CAMEL-12705: Remove unused imports

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../org/apache/camel/runtimecatalog/AbstractCamelCatalog.java |  4 ++--
 .../java/org/apache/camel/catalog/AbstractCamelCatalog.java   |  4 ++--
 .../test/java/org/apache/camel/catalog/CamelCatalogTest.java  | 11 +++++++++++
 3 files changed, 15 insertions(+), 4 deletions(-)

Reply | Threaded
Open this post in threaded view
|

[camel] 01/03: CAMEL-12705: Added unit test to reproduce the issue, ignored until fixed.

davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 48f8778a350197cf20be6619ad06892a8f1a0271
Author: Claus Ibsen <[hidden email]>
AuthorDate: Thu Aug 2 10:47:07 2018 +0200

    CAMEL-12705: Added unit test to reproduce the issue, ignored until fixed.
---
 .../java/org/apache/camel/catalog/CamelCatalogTest.java     | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index b5eb00a..f59b4fb 100644
--- a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -24,7 +24,9 @@ import java.util.Map;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.camel.runtimecatalog.RuntimeCamelCatalog;
 import org.junit.BeforeClass;
+import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -1180,6 +1182,17 @@ public class CamelCatalogTest {
     }
 
     @Test
+    @Ignore("CAMEL-12705") // TODO: Fix this bug
+    public void testNetty4Http4DynamicToIssue() throws Exception {
+        String uri = "netty4-http:http://10.192.1.10:8080/client/alerts/summary?throwExceptionOnFailure=false";
+        Map<String, String> params = catalog.endpointProperties(uri);
+        params.remove("path");
+
+        String resolved = catalog.asEndpointUri("netty4-http", params, false);
+        assertEquals("netty4-http:http:10.192.1.10:8080", resolved);
+    }
+
+    @Test
     public void testJSonSchemaHelper() throws Exception {
         String json = loadText(new FileInputStream("src/test/resources/org/foo/camel/dummy.json"));
         assertNotNull(json);

Reply | Threaded
Open this post in threaded view
|

[camel] 02/03: CAMEL-12705: Fixed camel-catalog syntax parser issue with hostname and dots such as when parsing the netty4-http endpoints.

davsclaus-2
In reply to this post by davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f9de67bae9c597dacdb2ce21797a4082a4040bb9
Author: Claus Ibsen <[hidden email]>
AuthorDate: Thu Aug 2 14:06:57 2018 +0200

    CAMEL-12705: Fixed camel-catalog syntax parser issue with hostname and dots such as when parsing the netty4-http endpoints.
---
 .../java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java    | 4 ++--
 .../src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java  | 4 ++--
 .../src/test/java/org/apache/camel/catalog/CamelCatalogTest.java      | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java b/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
index 70fe5ef..3e58ce4 100644
--- a/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
+++ b/camel-core/src/main/java/org/apache/camel/runtimecatalog/AbstractCamelCatalog.java
@@ -66,7 +66,7 @@ public abstract class AbstractCamelCatalog {
 
     // CHECKSTYLE:OFF
 
-    private static final Pattern SYNTAX_PATTERN = Pattern.compile("(\\w+)");
+    private static final Pattern SYNTAX_PATTERN = Pattern.compile("([\\w.]+)");
     private static final Pattern COMPONENT_SYNTAX_PARSER = Pattern.compile("([^\\w-]*)([\\w-]+)");
 
     private SuggestionStrategy suggestionStrategy;
@@ -938,7 +938,7 @@ public abstract class AbstractCamelCatalog {
             // oh darn some options is missing, so we need a complex way of building the uri
 
             // the tokens between the options in the path
-            String[] tokens = syntax.split("\\w+");
+            String[] tokens = syntax.split("[\\w.]+");
 
             // parse the syntax into each options
             Matcher matcher = SYNTAX_PATTERN.matcher(originalSyntax);
diff --git a/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java b/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
index 2e82e74..a85dcf6 100644
--- a/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
+++ b/platforms/camel-catalog/src/main/java/org/apache/camel/catalog/AbstractCamelCatalog.java
@@ -66,7 +66,7 @@ public abstract class AbstractCamelCatalog {
 
     // CHECKSTYLE:OFF
 
-    private static final Pattern SYNTAX_PATTERN = Pattern.compile("(\\w+)");
+    private static final Pattern SYNTAX_PATTERN = Pattern.compile("([\\w.]+)");
     private static final Pattern COMPONENT_SYNTAX_PARSER = Pattern.compile("([^\\w-]*)([\\w-]+)");
 
     private SuggestionStrategy suggestionStrategy;
@@ -938,7 +938,7 @@ public abstract class AbstractCamelCatalog {
             // oh darn some options is missing, so we need a complex way of building the uri
 
             // the tokens between the options in the path
-            String[] tokens = syntax.split("\\w+");
+            String[] tokens = syntax.split("[\\w.]+");
 
             // parse the syntax into each options
             Matcher matcher = SYNTAX_PATTERN.matcher(originalSyntax);
diff --git a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index f59b4fb..7ba5a05 100644
--- a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -1182,11 +1182,11 @@ public class CamelCatalogTest {
     }
 
     @Test
-    @Ignore("CAMEL-12705") // TODO: Fix this bug
     public void testNetty4Http4DynamicToIssue() throws Exception {
         String uri = "netty4-http:http://10.192.1.10:8080/client/alerts/summary?throwExceptionOnFailure=false";
         Map<String, String> params = catalog.endpointProperties(uri);
         params.remove("path");
+        params.remove("throwExceptionOnFailure");
 
         String resolved = catalog.asEndpointUri("netty4-http", params, false);
         assertEquals("netty4-http:http:10.192.1.10:8080", resolved);

Reply | Threaded
Open this post in threaded view
|

[camel] 03/03: CAMEL-12705: Remove unused imports

davsclaus-2
In reply to this post by davsclaus-2
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.22.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cd6871f261abea1c7b4aa70117a9d0cc3fe6df3a
Author: Claus Ibsen <[hidden email]>
AuthorDate: Thu Aug 2 14:41:32 2018 +0200

    CAMEL-12705: Remove unused imports
---
 .../src/test/java/org/apache/camel/catalog/CamelCatalogTest.java        | 2 --
 1 file changed, 2 deletions(-)

diff --git a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 7ba5a05..ceb036e 100644
--- a/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/camel-catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -24,9 +24,7 @@ import java.util.Map;
 
 import com.fasterxml.jackson.databind.JsonNode;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import org.apache.camel.runtimecatalog.RuntimeCamelCatalog;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;