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/29 07:36:28 UTC

[camel] branch master updated (1bb9a14 -> cc3a0b7)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 1bb9a14  Removed unused imports
     new b1fdcdd  Camel-JT400 - Use BindToRegistry annotation wherever possible
     new d8d9e70  Camel-JT400 - Fixed CS
     new cc3a0b7  Removed unused imports

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../camel/component/jt400/Jt400SecureTestSupport.java   | 17 +++++------------
 .../apache/camel/component/jt400/Jt400TestSupport.java  | 13 +++----------
 2 files changed, 8 insertions(+), 22 deletions(-)


[camel] 01/03: Camel-JT400 - Use BindToRegistry annotation wherever possible

Posted by ac...@apache.org.
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 b1fdcddb4efd9bdabe9b50a2ace4000c9572568a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 09:33:25 2019 +0200

    Camel-JT400 - Use BindToRegistry annotation wherever possible
---
 .../apache/camel/component/jt400/Jt400SecureTestSupport.java  | 11 +++--------
 .../org/apache/camel/component/jt400/Jt400TestSupport.java    | 11 +++--------
 2 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
index 3be50eb..9cfdb25 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
@@ -17,6 +17,8 @@
 package org.apache.camel.component.jt400;
 
 import com.ibm.as400.access.AS400ConnectionPool;
+
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.camel.util.ObjectHelper;
@@ -30,6 +32,7 @@ import org.junit.Before;
  */
 public abstract class Jt400SecureTestSupport extends CamelTestSupport {
 
+	@BindToRegistry("mockPool")
     private AS400ConnectionPool connectionPool;
 
     protected Jt400SecureTestSupport() {
@@ -49,14 +52,6 @@ public abstract class Jt400SecureTestSupport extends CamelTestSupport {
         }
     }
 
-    @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        ObjectHelper.notNull(connectionPool, "connectionPool");
-        JndiRegistry registry = super.createRegistry();
-        registry.bind("mockPool", connectionPool);
-        return registry;
-    }
-
     /**
      * Returns the mock connection pool.
      *
diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
index b596bb2..85bca57 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
@@ -17,6 +17,8 @@
 package org.apache.camel.component.jt400;
 
 import com.ibm.as400.access.AS400ConnectionPool;
+
+import org.apache.camel.BindToRegistry;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.apache.camel.util.ObjectHelper;
@@ -30,6 +32,7 @@ import org.junit.Before;
  */
 public abstract class Jt400TestSupport extends CamelTestSupport {
 
+	@BindToRegistry("mockPool")
     private AS400ConnectionPool connectionPool;
 
     protected Jt400TestSupport() {
@@ -49,14 +52,6 @@ public abstract class Jt400TestSupport extends CamelTestSupport {
         }
     }
 
-    @Override
-    protected JndiRegistry createRegistry() throws Exception {
-        ObjectHelper.notNull(connectionPool, "connectionPool");
-        JndiRegistry registry = super.createRegistry();
-        registry.bind("mockPool", connectionPool);
-        return registry;
-    }
-
     /**
      * Returns the mock connection pool.
      *


[camel] 02/03: Camel-JT400 - Fixed CS

Posted by ac...@apache.org.
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 d8d9e7058f131071c90cbd8859ed60cafd3226ce
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 09:34:35 2019 +0200

    Camel-JT400 - Fixed CS
---
 .../org/apache/camel/component/jt400/Jt400SecureTestSupport.java    | 6 +++---
 .../java/org/apache/camel/component/jt400/Jt400TestSupport.java     | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
index 9cfdb25..908d9bb 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
@@ -27,12 +27,12 @@ import org.junit.Before;
 
 /**
  * Useful base class for JT400 secured component unit tests. It creates a mock
- * secured connection pool, registers it under the ID {@code "mockPool"} and releases it
- * after the test runs.
+ * secured connection pool, registers it under the ID {@code "mockPool"} and
+ * releases it after the test runs.
  */
 public abstract class Jt400SecureTestSupport extends CamelTestSupport {
 
-	@BindToRegistry("mockPool")
+    @BindToRegistry("mockPool")
     private AS400ConnectionPool connectionPool;
 
     protected Jt400SecureTestSupport() {
diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
index 85bca57..49b1b0e 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
@@ -32,7 +32,7 @@ import org.junit.Before;
  */
 public abstract class Jt400TestSupport extends CamelTestSupport {
 
-	@BindToRegistry("mockPool")
+    @BindToRegistry("mockPool")
     private AS400ConnectionPool connectionPool;
 
     protected Jt400TestSupport() {


[camel] 03/03: Removed unused imports

Posted by ac...@apache.org.
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 cc3a0b7a1071f8eae0f2de1106267ba7404e0710
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jul 29 09:36:03 2019 +0200

    Removed unused imports
---
 .../java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java   | 2 --
 .../test/java/org/apache/camel/component/jt400/Jt400TestSupport.java    | 2 --
 2 files changed, 4 deletions(-)

diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
index 908d9bb..ca4b605 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400SecureTestSupport.java
@@ -19,9 +19,7 @@ package org.apache.camel.component.jt400;
 import com.ibm.as400.access.AS400ConnectionPool;
 
 import org.apache.camel.BindToRegistry;
-import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.camel.util.ObjectHelper;
 import org.junit.After;
 import org.junit.Before;
 
diff --git a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
index 49b1b0e..5ea0ce0 100644
--- a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
+++ b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400TestSupport.java
@@ -19,9 +19,7 @@ package org.apache.camel.component.jt400;
 import com.ibm.as400.access.AS400ConnectionPool;
 
 import org.apache.camel.BindToRegistry;
-import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.apache.camel.util.ObjectHelper;
 import org.junit.After;
 import org.junit.Before;