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/08/01 14:30:56 UTC

[camel] 01/03: CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Stream

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 7305809edc8c57a698e3d9929439c38bd04eed5b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Aug 1 16:28:17 2019 +0200

    CAMEL-13801 - camel3 - Use @BindToRegistry wherever possible, Camel-Stream
---
 .../camel/component/stream/StreamGroupLinesStrategyTest.java      | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamGroupLinesStrategyTest.java b/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamGroupLinesStrategyTest.java
index edfbec2..ed56044 100644
--- a/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamGroupLinesStrategyTest.java
+++ b/components/camel-stream/src/test/java/org/apache/camel/component/stream/StreamGroupLinesStrategyTest.java
@@ -18,6 +18,7 @@ package org.apache.camel.component.stream;
 
 import java.util.List;
 
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.impl.JndiRegistry;
@@ -25,11 +26,8 @@ import org.junit.Test;
 
 public class StreamGroupLinesStrategyTest extends StreamGroupLinesTest {
     
-    protected JndiRegistry createRegistry() throws Exception {
-        JndiRegistry jndi = super.createRegistry();
-        jndi.bind("myGroupStrategy", new MyGroupStrategy());
-        return jndi;
-    }
+	@BindToRegistry("myGroupStrategy")
+	private MyGroupStrategy strat = new MyGroupStrategy();
     
     class MyGroupStrategy implements GroupStrategy {