camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] camel git commit: camel-catalog - Fixed a bug when using temp queues in jms component.
Date Sun, 29 Jan 2017 14:15:42 GMT
camel-catalog - Fixed a bug when using temp queues in jms component.


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

Branch: refs/heads/camel-2.17.x
Commit: 9432a793b30df01620fe0c922b7dfece6bca97a9
Parents: a46b890
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sun Jan 29 15:13:47 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sun Jan 29 15:15:22 2017 +0100

----------------------------------------------------------------------
 .../camel/catalog/DefaultCamelCatalog.java      |  2 +-
 .../apache/camel/catalog/CamelCatalogTest.java  | 21 +++++++++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9432a793/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
index eb5035b..0a972f4 100644
--- a/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
+++ b/platforms/catalog/src/main/java/org/apache/camel/catalog/DefaultCamelCatalog.java
@@ -1072,7 +1072,7 @@ public class DefaultCamelCatalog implements CamelCatalog {
 
         // special for activemq/jms where the enum for destinationType causes a token issue
as it includes a colon
         // for 'temp:queue' and 'temp:topic' values
-        if ("activemq".equals(scheme) || "jms".equals("scheme")) {
+        if ("activemq".equals(scheme) || "jms".equals(scheme)) {
             if (uriPath.startsWith("temp:")) {
                 prevPath = 5;
             }

http://git-wip-us.apache.org/repos/asf/camel/blob/9432a793/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
----------------------------------------------------------------------
diff --git a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
index 2499227..ee15ae2 100644
--- a/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
+++ b/platforms/catalog/src/test/java/org/apache/camel/catalog/CamelCatalogTest.java
@@ -457,7 +457,26 @@ public class CamelCatalogTest {
         catalog.addComponent("activemq", "org.apache.activemq.camel.component.ActiveMQComponent");
 
         // activemq
-        EndpointValidationResult result = catalog.validateEndpointProperties("activemq:temp:queue:cheese");
+        EndpointValidationResult result = catalog.validateEndpointProperties("activemq:temp:queue:cheese?jmsMessageType=Bytes");
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("activemq:temp:queue:cheese?jmsMessageType=Bytes");
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("activemq:temp:queue:cheese?jmsMessageType=Bytes",
false, true, false);
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("activemq:temp:queue:cheese?jmsMessageType=Bytes",
false, false, true);
+        assertTrue(result.isSuccess());
+    }
+
+    @Test
+    public void validateJmsProperties() throws Exception {
+        // jms
+        EndpointValidationResult result = catalog.validateEndpointProperties("jms:temp:queue:cheese?jmsMessageType=Bytes");
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("jms:temp:queue:cheese?jmsMessageType=Bytes");
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("jms:temp:queue:cheese?jmsMessageType=Bytes",
false, true, false);
+        assertTrue(result.isSuccess());
+        result = catalog.validateEndpointProperties("jms:temp:queue:cheese?jmsMessageType=Bytes",
false, false, true);
         assertTrue(result.isSuccess());
     }
 


Mime
View raw message