camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/3] camel git commit: camel-catalog - Fixed a bug when using temp queues in jms component.
Date Sun, 29 Jan 2017 14:15:41 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/3112e08f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3112e08f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3112e08f

Branch: refs/heads/camel-2.18.x
Commit: 3112e08f1499e28c10ab595a02e04591299f093b
Parents: 26d7730
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:03 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/3112e08f/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 ebe8a9b..a5d5167 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
@@ -1329,7 +1329,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/3112e08f/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 5a67797..318f7f1 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
@@ -513,7 +513,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