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 2018/08/02 12:44:03 UTC

[camel] branch master updated (abb1611 -> ce9b887)

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

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


    from abb1611  CAMEL-11497: Update user guide toc in summary and migrate some pages
     new b0f4cb5  CAMEL-12705: Fixed camel-catalog syntax parser issue with hostname and dots such as when parsing the netty4-http endpoints.
     new ce9b887  CAMEL-12705: Remove unused imports

The 2 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:
 .../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      | 4 +---
 3 files changed, 5 insertions(+), 7 deletions(-)


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

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b0f4cb5b5c1b8746a9e8eb2e92570c78aeec2254
Author: Claus Ibsen <cl...@gmail.com>
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);


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

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit ce9b88774abc45ff312780db7538cdea9bcd4130
Author: Claus Ibsen <cl...@gmail.com>
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;