Fixed CS

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

Branch: refs/heads/master
Commit: b9bcff2794133776cbdfedc06108208a112d7cd7
Parents: 2ddca93
Author: Claus Ibsen <[email protected]>
Authored: Wed Jul 8 08:38:17 2015 +0200
Committer: Claus Ibsen <[email protected]>
Committed: Wed Jul 8 08:38:17 2015 +0200

----------------------------------------------------------------------
 .../component/jt400/Jt400Configuration.java     | 36 ++++----------------
 .../component/jt400/Jt400ComponentTest.java     |  4 +--
 .../component/jt400/Jt400ConfigurationTest.java |  2 +-
 .../jt400/MockAS400SecureConnectionPool.java    |  5 ++-
 4 files changed, 11 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b9bcff27/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
 
b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
index 631beb9..b33a25d 100644
--- 
a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
+++ 
b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Configuration.java
@@ -46,6 +46,7 @@ public class Jt400Configuration {
      * Enumeration of supported data formats
      */
     public enum Format {
+
         /**
          * Using <code>String</code> for transferring data
          */
@@ -68,54 +69,29 @@ public class Jt400Configuration {
      */
     private static final int DEFAULT_SYSTEM_CCSID = -1;
 
-    /**
-     * Pool from which physical connections to the system are obtained.
-     */
     private final AS400ConnectionPool connectionPool;
 
-    /**
-     * ID of the AS/400 user.
-     */
     @UriPath @Metadata(required = "true")
     private String userID;
 
-    /**
-     * Password of the AS/400 user.
-     */
     @UriPath @Metadata(required = "true")
     private String password;
 
-    /**
-     * Name of the AS/400 system.
-     */
     @UriPath @Metadata(required = "true")
     private String systemName;
 
-    /**
-     * Fully qualified integrated file system path name of the target object of
-     * this endpoint (either data queue or program).
-     */
     @UriPath @Metadata(required = "true")
     private String objectPath;
 
     @UriPath @Metadata(required = "true")
     private Jt400Type type;
 
-    /**
-     * CCSID to use for the connection with the AS/400 system.
-     */
     @UriParam
     private int ccsid = DEFAULT_SYSTEM_CCSID;
     
-    /**
-     * Data format for sending messages.
-     */
     @UriParam(defaultValue = "text")
     private Format format = Format.text;
     
-    /**
-     * Whether AS/400 prompting is enabled in the environment running Camel.
-     */
     @UriParam
     private boolean guiAvailable;
 
@@ -128,9 +104,6 @@ public class Jt400Configuration {
     @UriParam(defaultValue = "EQ")
     private SearchType searchType = SearchType.EQ;
 
-    /**
-     * Whether connections to AS/400 are secured with SSL.
-     */
     @UriParam
     private boolean secured;
 
@@ -303,6 +276,9 @@ public class Jt400Configuration {
         return secured;
     }
 
+    /**
+     * Whether connections to AS/400 are secured with SSL.
+     */
     public void setSecured(boolean secured) {
         this.secured = secured;
     }
@@ -364,9 +340,9 @@ public class Jt400Configuration {
                 LOG.debug("Getting an AS400 object for '{}' from {}.", 
systemName + '/' + userID, connectionPool);
             }
 
-            if(isSecured()){
+            if (isSecured()) {
                 system = connectionPool.getSecureConnection(systemName, 
userID, password);
-            }else{
+            } else {
                 system = connectionPool.getConnection(systemName, userID, 
password);
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/b9bcff27/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ComponentTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ComponentTest.java
 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ComponentTest.java
index 0509037..0a37ec0 100644
--- 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ComponentTest.java
+++ 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ComponentTest.java
@@ -80,7 +80,7 @@ public class Jt400ComponentTest extends Jt400TestSupport {
                 
.createEndpoint("jt400://user:password@host/qsys.lib/library.lib/queue.dtaq?connectionPool=#mockPool&secured=true");
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof Jt400Endpoint);
-        assertTrue( ((Jt400Endpoint)endpoint).isSecured() );
+        assertTrue(((Jt400Endpoint) endpoint).isSecured());
     }
 
     /**
@@ -92,7 +92,7 @@ public class Jt400ComponentTest extends Jt400TestSupport {
                 
.createEndpoint("jt400://user:password@host/qsys.lib/library.lib/queue.pgm?connectionPool=#mockPool&secured=true");
         assertNotNull(endpoint);
         assertTrue(endpoint instanceof Jt400Endpoint);
-        assertTrue( ((Jt400Endpoint)endpoint).isSecured() );
+        assertTrue(((Jt400Endpoint) endpoint).isSecured());
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/b9bcff27/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ConfigurationTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ConfigurationTest.java
 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ConfigurationTest.java
index 5e4768c..8d8cbd4 100644
--- 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ConfigurationTest.java
+++ 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/Jt400ConfigurationTest.java
@@ -31,7 +31,7 @@ public class Jt400ConfigurationTest extends Jt400TestSupport {
 
     @Test
     public void testDefaultSecured() {
-        assertFalse( jt400Configuration.isSecured());
+        assertFalse(jt400Configuration.isSecured());
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/camel/blob/b9bcff27/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/MockAS400SecureConnectionPool.java
----------------------------------------------------------------------
diff --git 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/MockAS400SecureConnectionPool.java
 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/MockAS400SecureConnectionPool.java
index 3c3d21f..effd867 100644
--- 
a/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/MockAS400SecureConnectionPool.java
+++ 
b/components/camel-jt400/src/test/java/org/apache/camel/component/jt400/MockAS400SecureConnectionPool.java
@@ -16,19 +16,18 @@
  */
 package org.apache.camel.component.jt400;
 
+import java.util.Locale;
+
 import com.ibm.as400.access.AS400;
 import com.ibm.as400.access.AS400ConnectionPool;
 import com.ibm.as400.access.ConnectionPoolException;
 import com.ibm.as400.security.auth.ProfileTokenCredential;
 
-import java.util.Locale;
-
 /**
  * Mock {@code AS400ConnectionPool} implementation, useful in unit testing 
JT400 endpoints with secure option=true.
  */
 public class MockAS400SecureConnectionPool extends AS400ConnectionPool {
 
-
     public MockAS400SecureConnectionPool() {
         setRunMaintenance(false);
         setThreadUsed(false);

Reply via email to