Fixed CS. This closes #1565

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

Branch: refs/heads/master
Commit: cded03c5a547a59a760d191959476dd3674f5429
Parents: 927205e
Author: Claus Ibsen <davscl...@apache.org>
Authored: Tue Mar 28 10:17:37 2017 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Tue Mar 28 10:18:35 2017 +0200

----------------------------------------------------------------------
 .../camel/component/sjms/SjmsComponent.java     | 23 ++++++++++++++------
 .../camel/component/sjms/SjmsEndpoint.java      | 20 ++++++++++++-----
 .../component/sjms/batch/SjmsBatchEndpoint.java | 16 ++++++++------
 .../component/sjms/support/MockConnection.java  |  3 ---
 .../sjms/support/MockConnectionFactory.java     |  4 ----
 .../sjms/support/MockMessageConsumer.java       |  4 +---
 .../component/sjms/support/MockSession.java     |  4 ----
 .../src/main/docs/sjms2-component.adoc          |  2 +-
 8 files changed, 42 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
index f4e07c0..158c0ac 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
@@ -45,7 +45,10 @@ public class SjmsComponent extends 
HeaderFilterStrategyComponent {
     @Metadata(label = "advanced", description = "A ConnectionResource is an 
interface that allows for customization and container control of the 
ConnectionFactory."
                     + " * See Plugable Connection Resource Management for 
further details.")
     private ConnectionResource connectionResource;
-    @Metadata(label = "advanced", description = "Pluggable strategy for 
encoding and decoding JMS keys so they can be compliant with the JMS 
specification. Camel provides one implementation out of the box: default. The 
default strategy will safely marshal dots and hyphens (. and -). Can be used 
for JMS brokers which do not care whether JMS header keys contain illegal 
characters. You can provide your own implementation of the 
org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # 
notation.")
+    @Metadata(label = "advanced", description = "Pluggable strategy for 
encoding and decoding JMS keys so they can be compliant with the JMS 
specification."
+        + " Camel provides one implementation out of the box: default. The 
default strategy will safely marshal dots and hyphens (. and -)."
+        + " Can be used for JMS brokers which do not care whether JMS header 
keys contain illegal characters. You can provide your own implementation"
+        + " of the org.apache.camel.component.jms.JmsKeyFormatStrategy and 
refer to it using the # notation.")
     private JmsKeyFormatStrategy jmsKeyFormatStrategy = new 
DefaultJmsKeyFormatStrategy();
     @Metadata(defaultValue = "1", description = "The maximum number of 
connections available to endpoints started under this component")
     private Integer connectionCount = 1;
@@ -55,17 +58,23 @@ public class SjmsComponent extends 
HeaderFilterStrategyComponent {
     private TimedTaskManager timedTaskManager;
     @Metadata(label = "advanced", description = "To use a custom 
DestinationCreationStrategy.")
     private DestinationCreationStrategy destinationCreationStrategy;
-    @Metadata(label = "advanced", description = "To use the given 
MessageCreatedStrategy which are invoked when Camel creates new instances of 
<tt>javax.jms.Message</tt> objects when Camel is sending a JMS message.")
+    @Metadata(label = "advanced", description = "To use the given 
MessageCreatedStrategy which are invoked when Camel creates new instances"
+        + " of <tt>javax.jms.Message</tt> objects when Camel is sending a JMS 
message.")
     private MessageCreatedStrategy messageCreatedStrategy;
-    @Metadata(label = "advanced", defaultValue = "true", description = "When 
using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource} then should each 
{@link javax.jms.Connection} be tested (calling start) before returned from the 
pool.")
+    @Metadata(label = "advanced", defaultValue = "true", description = "When 
using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}"
+        + " then should each {@link javax.jms.Connection} be tested (calling 
start) before returned from the pool.")
     private boolean connectionTestOnBorrow = true;
-    @Metadata(label = "security", secret = true, description = "The username 
to use when creating {@link javax.jms.Connection} when using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
+    @Metadata(label = "security", secret = true, description = "The username 
to use when creating {@link javax.jms.Connection} when using the"
+        + " default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
     private String connectionUsername;
-    @Metadata(label = "security", secret = true, description = "The password 
to use when creating {@link javax.jms.Connection} when using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
+    @Metadata(label = "security", secret = true, description = "The password 
to use when creating {@link javax.jms.Connection} when using the"
+        + " default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
     private String connectionPassword;
-    @Metadata(label = "advanced", description = "The client ID to use when 
creating {@link javax.jms.Connection} when using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
+    @Metadata(label = "advanced", description = "The client ID to use when 
creating {@link javax.jms.Connection} when using the"
+        + " default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
     private String connectionClientId;
-    @Metadata(label = "advanced", defaultValue = "5000", description = "The 
max wait time in millis to block and wait on free connection when the pool is 
exhausted when using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
+    @Metadata(label = "advanced", defaultValue = "5000", description = "The 
max wait time in millis to block and wait on free connection when the pool"
+        + " is exhausted when using the default {@link 
org.apache.camel.component.sjms.jms.ConnectionFactoryResource}.")
     private long connectionMaxWait = 5000;
 
     public SjmsComponent() {

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java
index 77b53a1..c73ebb0 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsEndpoint.java
@@ -81,13 +81,15 @@ public class SjmsEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Mult
             description = "To use a custom HeaderFilterStrategy to filter 
header to and from Camel message.")
     private HeaderFilterStrategy headerFilterStrategy;
     @UriParam(label = "advanced",
-            description = "Whether to include all JMSXxxx properties when 
mapping from JMS to Camel Message. Setting this to true will include properties 
such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom 
headerFilterStrategy then this option does not apply.")
+            description = "Whether to include all JMSXxxx properties when 
mapping from JMS to Camel Message."
+                + " Setting this to true will include properties such as 
JMSXAppID, and JMSXUserID etc. Note: If you are using a custom 
headerFilterStrategy then this option does not apply.")
     private boolean includeAllJMSXProperties;
     @UriParam(label = "consumer,transaction",
             description = "Specifies whether to use transacted mode")
     private boolean transacted;
     @UriParam(label = "transaction,advanced", defaultValue = "true",
-            description = "Specifies whether to share JMS session with other 
SJMS endpoints. Turn this off if your route is accessing to multiple JMS 
providers. If you need transaction against multiple JMS providers, use jms 
component to leverage XA transaction.")
+            description = "Specifies whether to share JMS session with other 
SJMS endpoints. Turn this off if your route is accessing to multiple JMS 
providers."
+                + " If you need transaction against multiple JMS providers, 
use jms component to leverage XA transaction.")
     private boolean sharedJMSSession = true;
     @UriParam(label = "producer",
             description = "Sets the reply to destination name used for InOut 
producer endpoints.")
@@ -125,7 +127,11 @@ public class SjmsEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Mult
             description = "Sets timeout (in millis) for batch transactions, 
the value should be 1000 or higher.")
     private long transactionBatchTimeout = 5000;
     @UriParam(label = "advanced",
-            description = "Whether to startup the consumer message listener 
asynchronously, when starting a route. For example if a JmsConsumer cannot get 
a connection to a remote JMS broker, then it may block while retrying and/or 
failover. This will cause Camel to block while starting routes. By setting this 
option to true, you will let routes startup, while the JmsConsumer connects to 
the JMS broker using a dedicated thread in asynchronous mode. If this option is 
used, then beware that if the connection could not be established, then an 
exception is logged at WARN level, and the consumer will not be able to receive 
messages; You can then restart the route to retry.")
+            description = "Whether to startup the consumer message listener 
asynchronously, when starting a route."
+                + " For example if a JmsConsumer cannot get a connection to a 
remote JMS broker, then it may block while retrying and/or failover."
+                + " This will cause Camel to block while starting routes. By 
setting this option to true, you will let routes startup, while the JmsConsumer 
connects to the JMS broker"
+                + " using a dedicated thread in asynchronous mode. If this 
option is used, then beware that if the connection could not be established, 
then an exception is logged at WARN level,"
+                + " and the consumer will not be able to receive messages; You 
can then restart the route to retry.")
     private boolean asyncStartListener;
     @UriParam(label = "advanced",
             description = "Whether to stop the consumer message listener 
asynchronously, when stopping a route.")
@@ -137,7 +143,8 @@ public class SjmsEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Mult
             description = "Whether to allow sending messages with no body. If 
this option is false and the message body is null, then an JMSException is 
thrown.")
     private boolean allowNullBody = true;
     @UriParam(label = "advanced", defaultValue = "true",
-            description = "Specifies whether Camel should auto map the 
received JMS message to a suited payload type, such as javax.jms.TextMessage to 
a String etc. See section about how mapping works below for more details.")
+            description = "Specifies whether Camel should auto map the 
received JMS message to a suited payload type, such as javax.jms.TextMessage to 
a String etc."
+                + " See section about how mapping works below for more 
details.")
     private boolean mapJmsMessage = true;
     @UriParam(label = "transaction",
             description = "Sets the commit strategy.")
@@ -149,7 +156,10 @@ public class SjmsEndpoint extends DefaultEndpoint 
implements AsyncEndpoint, Mult
             description = "To use the given MessageCreatedStrategy which are 
invoked when Camel creates new instances of <tt>javax.jms.Message</tt> objects 
when Camel is sending a JMS message.")
     private MessageCreatedStrategy messageCreatedStrategy;
     @UriParam(label = "advanced",
-            description = "Pluggable strategy for encoding and decoding JMS 
keys so they can be compliant with the JMS specification. Camel provides two 
implementations out of the box: default and passthrough. The default strategy 
will safely marshal dots and hyphens (. and -). The passthrough strategy leaves 
the key as is. Can be used for JMS brokers which do not care whether JMS header 
keys contain illegal characters. You can provide your own implementation of the 
org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # 
notation.")
+            description = "Pluggable strategy for encoding and decoding JMS 
keys so they can be compliant with the JMS specification."
+                + "Camel provides two implementations out of the box: default 
and passthrough. The default strategy will safely marshal dots and hyphens (. 
and -)."
+                + " The passthrough strategy leaves the key as is. Can be used 
for JMS brokers which do not care whether JMS header keys contain illegal 
characters."
+                + " You can provide your own implementation of the 
org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # 
notation.")
     private JmsKeyFormatStrategy jmsKeyFormatStrategy;
     @UriParam(label = "advanced",
             description = "Initializes the connectionResource for the 
endpoint, which takes precedence over the component's connectionResource, if 
any")

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpoint.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpoint.java
 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpoint.java
index c8debd7..648aa77 100644
--- 
a/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpoint.java
+++ 
b/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/batch/SjmsBatchEndpoint.java
@@ -400,6 +400,14 @@ public class SjmsBatchEndpoint extends DefaultEndpoint 
implements HeaderFilterSt
     }
 
     /**
+     * Specifies the interval between recovery attempts, i.e. when a 
connection is being refreshed, in milliseconds.
+     * The default is 5000 ms, that is, 5 seconds.
+     */
+    public void setRecoveryInterval(int recoveryInterval) {
+        this.recoveryInterval = recoveryInterval;
+    }
+
+    /**
      * The delay in millis between attempts to re-establish a valid session.
      * If this is a positive value the SjmsBatchConsumer will attempt to 
create a new session if it sees an IllegalStateException
      * during message consumption. This delay value allows you to pause 
between attempts to prevent spamming the logs.
@@ -409,15 +417,9 @@ public class SjmsBatchEndpoint extends DefaultEndpoint 
implements HeaderFilterSt
     public void setKeepAliveDelay(int keepAliveDelay) {
         this.keepAliveDelay = keepAliveDelay;
     }
+
     public int getKeepAliveDelay() {
         return keepAliveDelay;
     }
 
-    /**
-     * Specifies the interval between recovery attempts, i.e. when a 
connection is being refreshed, in milliseconds.
-     * The default is 5000 ms, that is, 5 seconds.
-     */
-    public void setRecoveryInterval(int recoveryInterval) {
-        this.recoveryInterval = recoveryInterval;
-    }
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnection.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnection.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnection.java
index 441a263..335c47b 100644
--- 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnection.java
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnection.java
@@ -23,9 +23,6 @@ import org.apache.activemq.management.JMSStatsImpl;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.util.IdGenerator;
 
-/**
- * Created by bryan.love on 3/22/17.
- */
 public class MockConnection extends ActiveMQConnection {
     private int returnBadSessionNTimes;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnectionFactory.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnectionFactory.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnectionFactory.java
index 0158ff7..c7fe9f1 100644
--- 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnectionFactory.java
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockConnectionFactory.java
@@ -25,10 +25,6 @@ import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.management.JMSStatsImpl;
 import org.apache.activemq.transport.Transport;
 
-
-/**
- * Created by bryan.love on 3/22/17.
- */
 public class MockConnectionFactory extends ActiveMQConnectionFactory {
     private int returnBadSessionNTimes;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockMessageConsumer.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockMessageConsumer.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockMessageConsumer.java
index 467aedf..9a5a17e 100644
--- 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockMessageConsumer.java
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockMessageConsumer.java
@@ -25,10 +25,8 @@ import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConsumerId;
 
-/**
- * Created by bryan.love on 3/22/17.
- */
 public class MockMessageConsumer extends ActiveMQMessageConsumer {
+
     private boolean isBadSession;
 
     public MockMessageConsumer(ActiveMQSession session, ConsumerId consumerId, 
ActiveMQDestination dest, String name, String selector, int prefetch,

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockSession.java
----------------------------------------------------------------------
diff --git 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockSession.java
 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockSession.java
index 391d734..8495c9f 100644
--- 
a/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockSession.java
+++ 
b/components/camel-sjms/src/test/java/org/apache/camel/component/sjms/support/MockSession.java
@@ -32,10 +32,6 @@ import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTempQueue;
 import org.apache.activemq.command.SessionId;
 
-
-/**
- * Created by bryan.love on 3/22/17.
- */
 public class MockSession extends ActiveMQSession {
     private boolean isBadSession;
 

http://git-wip-us.apache.org/repos/asf/camel/blob/cded03c5/components/camel-sjms2/src/main/docs/sjms2-component.adoc
----------------------------------------------------------------------
diff --git a/components/camel-sjms2/src/main/docs/sjms2-component.adoc 
b/components/camel-sjms2/src/main/docs/sjms2-component.adoc
index c9da69a..f3c5e75 100644
--- a/components/camel-sjms2/src/main/docs/sjms2-component.adoc
+++ b/components/camel-sjms2/src/main/docs/sjms2-component.adoc
@@ -163,7 +163,7 @@ with the following path and query parameters:
 | **exceptionListener** (advanced) | Specifies the JMS Exception Listener that 
is to be notified of any underlying JMS exceptions. |  | ExceptionListener
 | **headerFilterStrategy** (advanced) | To use a custom HeaderFilterStrategy 
to filter header to and from Camel message. |  | HeaderFilterStrategy
 | **includeAllJMSXProperties** (advanced) | Whether to include all JMSXxxx 
properties when mapping from JMS to Camel Message. Setting this to true will 
include properties such as JMSXAppID and JMSXUserID etc. Note: If you are using 
a custom headerFilterStrategy then this option does not apply. | false | boolean
-| **jmsKeyFormatStrategy** (advanced) | Pluggable strategy for encoding and 
decoding JMS keys so they can be compliant with the JMS specification. Camel 
provides two implementations out of the box: default and passthrough. The 
default strategy will safely marshal dots and hyphens (. and -). The 
passthrough strategy leaves the key as is. Can be used for JMS brokers which do 
not care whether JMS header keys contain illegal characters. You can provide 
your own implementation of the 
org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the 
notation. |  | JmsKeyFormatStrategy
+| **jmsKeyFormatStrategy** (advanced) | Pluggable strategy for encoding and 
decoding JMS keys so they can be compliant with the JMS specification.Camel 
provides two implementations out of the box: default and passthrough. The 
default strategy will safely marshal dots and hyphens (. and -). The 
passthrough strategy leaves the key as is. Can be used for JMS brokers which do 
not care whether JMS header keys contain illegal characters. You can provide 
your own implementation of the 
org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the 
notation. |  | JmsKeyFormatStrategy
 | **mapJmsMessage** (advanced) | Specifies whether Camel should auto map the 
received JMS message to a suited payload type such as javax.jms.TextMessage to 
a String etc. See section about how mapping works below for more details. | 
true | boolean
 | **messageCreatedStrategy** (advanced) | To use the given 
MessageCreatedStrategy which are invoked when Camel creates new instances of 
javax.jms.Message objects when Camel is sending a JMS message. |  | 
MessageCreatedStrategy
 | **errorHandlerLoggingLevel** (logging) | Allows to configure the default 
errorHandler logging level for logging uncaught exceptions. | WARN | 
LoggingLevel

Reply via email to