You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/07/25 07:07:09 UTC
[camel] 01/02: Camel-google-pubsub: Use BindToRegistry wherever
possible
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 86f981cd8c22e1dba4753319b1d843ff47967a68
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Jul 25 09:05:26 2019 +0200
Camel-google-pubsub: Use BindToRegistry wherever possible
---
.../camel/component/google/pubsub/PubsubTestSupport.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/components/camel-google-pubsub/src/test/java/org/apache/camel/component/google/pubsub/PubsubTestSupport.java b/components/camel-google-pubsub/src/test/java/org/apache/camel/component/google/pubsub/PubsubTestSupport.java
index f99bc50..c60f22b 100644
--- a/components/camel-google-pubsub/src/test/java/org/apache/camel/component/google/pubsub/PubsubTestSupport.java
+++ b/components/camel-google-pubsub/src/test/java/org/apache/camel/component/google/pubsub/PubsubTestSupport.java
@@ -23,6 +23,8 @@ import com.google.api.client.googleapis.json.GoogleJsonResponseException;
import com.google.api.services.pubsub.Pubsub;
import com.google.api.services.pubsub.model.Subscription;
import com.google.api.services.pubsub.model.Topic;
+
+import org.apache.camel.BindToRegistry;
import org.apache.camel.CamelContext;
import org.apache.camel.component.properties.PropertiesComponent;
import org.apache.camel.impl.JndiRegistry;
@@ -70,11 +72,9 @@ public class PubsubTestSupport extends CamelTestSupport {
context.addComponent("properties", new PropertiesComponent("ref:prop"));
}
- @Override
- protected JndiRegistry createRegistry() throws Exception {
- JndiRegistry jndi = super.createRegistry();
- jndi.bind("prop", loadProperties());
- return jndi;
+ @BindToRegistry("prop")
+ public Properties loadRegProperties() throws Exception {
+ return loadProperties();
}
@Override