camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/3] git commit: CAMEL-7384 Fixed the NPE of camel-rabbitmq test
Date Thu, 15 May 2014 13:24:28 GMT
Repository: camel
Updated Branches:
  refs/heads/master cfc1d8ddf -> 415b82e6f


CAMEL-7384 Fixed the NPE of camel-rabbitmq test


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

Branch: refs/heads/master
Commit: 62a2eb679b8849fa708b87e627fff36b65dc2ecd
Parents: a7ea864
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Thu May 15 15:13:11 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Thu May 15 21:22:32 2014 +0800

----------------------------------------------------------------------
 .../org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java    | 2 +-
 .../apache/camel/component/rabbitmq/RabbitMQEndpointTest.java    | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/62a2eb67/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
index 646a633..272df41 100644
--- a/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
+++ b/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQEndpoint.java
@@ -126,7 +126,7 @@ public class RabbitMQEndpoint extends DefaultEndpoint {
         }
     }
 
-    private ConnectionFactory getOrCreateConnectionFactory() {
+    protected ConnectionFactory getOrCreateConnectionFactory() {
         if (connectionFactory == null) {
             ConnectionFactory factory = new ConnectionFactory();
             factory.setUsername(getUsername());

http://git-wip-us.apache.org/repos/asf/camel/blob/62a2eb67/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
----------------------------------------------------------------------
diff --git a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
index 11b3675..86a7bcc 100644
--- a/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
+++ b/components/camel-rabbitmq/src/test/java/org/apache/camel/component/rabbitmq/RabbitMQEndpointTest.java
@@ -132,8 +132,8 @@ public class RabbitMQEndpointTest extends CamelTestSupport {
     }
 
     private ConnectionFactory createConnectionFactory(String uri) {
-        RabbitMQEndpoint endpoint = context.getEndpoint(uri, RabbitMQEndpoint.class); 
-        return endpoint.getConnectionFactory();
+        RabbitMQEndpoint endpoint = context.getEndpoint(uri, RabbitMQEndpoint.class);
+        return endpoint.getOrCreateConnectionFactory();
     }
 
     @Test


Mime
View raw message