camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [7/8] camel git commit: CAMEL-10511: Polished and fixed CS
Date Fri, 16 Dec 2016 08:08:18 GMT
CAMEL-10511: Polished and fixed CS


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

Branch: refs/heads/master
Commit: 58e36d63b0148e4e5931d5a0619312eb969edc80
Parents: 91121843
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri Dec 16 09:02:52 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Dec 16 09:04:53 2016 +0100

----------------------------------------------------------------------
 .../mllp/MllpAcknowledgementDeliveryException.java          | 1 +
 .../component/mllp/MllpAcknowledgementTimeoutException.java | 1 +
 .../mllp/MllpApplicationErrorAcknowledgementException.java  | 1 +
 .../mllp/MllpApplicationRejectAcknowledgementException.java | 1 +
 .../mllp/MllpCommitErrorAcknowledgementException.java       | 1 +
 .../mllp/MllpCommitRejectAcknowledgementException.java      | 1 +
 .../java/org/apache/camel/component/mllp/MllpComponent.java | 2 +-
 .../java/org/apache/camel/component/mllp/MllpException.java | 1 -
 .../org/apache/camel/component/mllp/MllpFrameException.java | 2 ++
 .../component/mllp/MllpInvalidAcknowledgementException.java | 1 +
 .../camel/component/mllp/MllpInvalidMessageException.java   | 1 +
 .../mllp/MllpNegativeAcknowledgementException.java          | 1 +
 .../component/mllp/MllpReceiveAcknowledgementException.java | 3 +--
 .../apache/camel/component/mllp/MllpReceiveException.java   | 1 +
 .../apache/camel/component/mllp/MllpTcpClientProducer.java  | 2 +-
 .../apache/camel/component/mllp/MllpTcpServerConsumer.java  | 2 +-
 .../java/org/apache/camel/component/mllp/impl/Hl7Util.java  | 1 +
 .../camel/component/mllp/impl/MllpBufferedSocketWriter.java | 1 +
 .../apache/camel/component/mllp/impl/MllpSocketReader.java  | 2 +-
 .../apache/camel/component/mllp/impl/MllpSocketUtil.java    | 1 +
 .../apache/camel/component/mllp/impl/MllpSocketWriter.java  | 1 +
 .../mllp/Hl7AcknowledgementGenerationException.java         | 2 +-
 .../camel/processor/mllp/Hl7AcknowledgementGenerator.java   | 3 +--
 .../mllp/MllpTcpServerConsumerMessageValidationTest.java    | 9 ++++-----
 .../camel/component/mllp/MllpTcpServerConsumerTest.java     | 8 ++++----
 25 files changed, 31 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementDeliveryException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementDeliveryException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementDeliveryException.java
index c6fc878..19bc353 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementDeliveryException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementDeliveryException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Consumer cannot deliver the MLLP Acknowledgement
  */
 public class MllpAcknowledgementDeliveryException extends MllpAcknowledgementException {
+
     static final String EXCEPTION_MESSAGE = "HL7 Acknowledgment Delivery Failed";
 
     public MllpAcknowledgementDeliveryException(byte[] hl7Message, byte[] hl7Acknowledgement)
{

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementTimeoutException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementTimeoutException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementTimeoutException.java
index 8cb2822..50510c9 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementTimeoutException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpAcknowledgementTimeoutException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer does not receive a HL7 acknowledgement within the configured
timespan
  */
 public class MllpAcknowledgementTimeoutException extends MllpAcknowledgementException {
+
     static final String EXCEPTION_MESSAGE = "Timeout receiving HL7 Acknowledgement";
 
     public MllpAcknowledgementTimeoutException(byte[] hl7Message) {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationErrorAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationErrorAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationErrorAcknowledgementException.java
index c8db47a..afcbdc5 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationErrorAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationErrorAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer receives a HL7 Application Error Acknowledgement
  */
 public class MllpApplicationErrorAcknowledgementException extends MllpNegativeAcknowledgementException
{
+
     static final String EXCEPTION_MESSAGE = "HL7 Application Error Acknowledgment Received";
 
     public MllpApplicationErrorAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement)
{

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationRejectAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationRejectAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationRejectAcknowledgementException.java
index 00dd3e4..ca0deb6 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationRejectAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpApplicationRejectAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer receives a HL7 Application Reject Acknowledgement
  */
 public class MllpApplicationRejectAcknowledgementException extends MllpNegativeAcknowledgementException
{
+
     static final String EXCEPTION_MESSAGE = "HL7 Application Reject Acknowledgment Received";
 
     public MllpApplicationRejectAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement)
{

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitErrorAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitErrorAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitErrorAcknowledgementException.java
index bec34d9..05591de 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitErrorAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitErrorAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer receives a HL7 Commit Error Acknowledgement
  */
 public class MllpCommitErrorAcknowledgementException extends MllpNegativeAcknowledgementException
{
+
     static final String EXCEPTION_MESSAGE = "HL7 Commit Error Acknowledgment Received";
 
     public MllpCommitErrorAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement)
{

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitRejectAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitRejectAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitRejectAcknowledgementException.java
index f98ee5e..b21d213 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitRejectAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpCommitRejectAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer receives a HL7 Commit Reject Acknowledgement
  */
 public class MllpCommitRejectAcknowledgementException extends MllpNegativeAcknowledgementException
{
+
     static final String EXCEPTION_MESSAGE = "HL7 Commit Reject Acknowledgment Received";
 
     public MllpCommitRejectAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement)
{

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpComponent.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpComponent.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpComponent.java
index f3e22b1..504a6cf 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpComponent.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpComponent.java
@@ -23,13 +23,13 @@ import org.apache.camel.Endpoint;
 import org.apache.camel.impl.UriEndpointComponent;
 
 import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_BLOCK;
-import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_DATA;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 /**
  * Represents the component that manages {@link MllpEndpoint}.
  */
 public class MllpComponent extends UriEndpointComponent {
+
     public static final String MLLP_LOG_PHI_PROPERTY = "org.apache.camel.component.mllp.logPHI";
 
     public MllpComponent() {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpException.java
index 0d2c1ce..ffa908f 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpException.java
@@ -59,7 +59,6 @@ public class MllpException extends Exception {
         this.hl7Acknowledgement = (hl7Acknowledgement != null && hl7Acknowledgement.length
> 0) ? hl7Acknowledgement : null;
     }
 
-
     /**
      * Get the HL7 message payload associated with this exception, if any.
      *

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpFrameException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpFrameException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpFrameException.java
index 7b7a3c4..7ae2dd1 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpFrameException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpFrameException.java
@@ -21,7 +21,9 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer or consumer encounters a corrupt MLLP Frame while attempting
  * to readEnvelopedPayload or writeEnvelopedMessage a MLLP payload.
  */
+@Deprecated
 public class MllpFrameException extends MllpException {
+
     public MllpFrameException(String message, byte[] hl7Message) {
         super(message, hl7Message);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidAcknowledgementException.java
index 67d5316..2543bec 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Producer receives a HL7 Acknowledgement for which the HL7 Acknowledgement
type cannot be determined.
  */
 public class MllpInvalidAcknowledgementException extends MllpAcknowledgementException {
+
     public MllpInvalidAcknowledgementException(String message, byte[] hl7Message, byte[]
hl7Acknowledgement) {
         super(message, hl7Message, hl7Acknowledgement);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidMessageException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidMessageException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidMessageException.java
index 9cde29a..847a4de 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidMessageException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpInvalidMessageException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Consumer receives an invalid HL7 Message.
  */
 public class MllpInvalidMessageException extends MllpException {
+
     public MllpInvalidMessageException(String message, byte[] hl7Message) {
         super(message, hl7Message);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpNegativeAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpNegativeAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpNegativeAcknowledgementException.java
index 6b8a4f8..b57aebe 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpNegativeAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpNegativeAcknowledgementException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Abstract base for all MLLP Negative Acknowledgements
  */
 public abstract class MllpNegativeAcknowledgementException extends MllpAcknowledgementException
{
+
     public MllpNegativeAcknowledgementException(String message, byte[] hl7Message, byte[]
hl7Acknowledgement) {
         super(message, hl7Message, hl7Acknowledgement);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveAcknowledgementException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveAcknowledgementException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveAcknowledgementException.java
index 2268137..75b486f 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveAcknowledgementException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveAcknowledgementException.java
@@ -26,7 +26,6 @@ public class MllpReceiveAcknowledgementException extends MllpAcknowledgementExce
         super(EXCEPTION_MESSAGE, hl7Message);
     }
 
-
     public MllpReceiveAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement)
{
         super(EXCEPTION_MESSAGE, hl7Message, hl7Acknowledgement);
     }
@@ -35,7 +34,6 @@ public class MllpReceiveAcknowledgementException extends MllpAcknowledgementExce
         super(EXCEPTION_MESSAGE, hl7Message, cause);
     }
 
-
     public MllpReceiveAcknowledgementException(byte[] hl7Message, byte[] hl7Acknowledgement,
Throwable cause) {
         super(EXCEPTION_MESSAGE, hl7Message, hl7Acknowledgement, cause);
     }
@@ -51,6 +49,7 @@ public class MllpReceiveAcknowledgementException extends MllpAcknowledgementExce
     public MllpReceiveAcknowledgementException(String message, byte[] hl7Message, Throwable
cause) {
         super(message, hl7Message, cause);
     }
+
     public MllpReceiveAcknowledgementException(String message, byte[] hl7Message, byte[]
hl7Acknowledgement, Throwable cause) {
         super(message, hl7Message, hl7Acknowledgement, cause);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveException.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveException.java
index c755d02..bf8826b 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpReceiveException.java
@@ -20,6 +20,7 @@ package org.apache.camel.component.mllp;
  * Raised when a MLLP Consumer cannot deliver the MLLP Acknowledgement
  */
 public class MllpReceiveException extends MllpException {
+
     public MllpReceiveException(String message) {
         super(message);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java
index 69176bc..e1827cb 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpClientProducer.java
@@ -237,7 +237,7 @@ public class MllpTcpClientProducer extends DefaultProducer {
     /**
      * Validate the TCP Connection
      *
-     * @return null if the connection is valid, otherwise the Exception encounted checking
the connection
+     * @return null if the connection is valid, otherwise the Exception encountered checking
the connection
      */
     void checkConnection() throws IOException {
         if (null == socket || socket.isClosed() || !socket.isConnected()) {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
index 0ec8564..b1be22b 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/MllpTcpServerConsumer.java
@@ -15,6 +15,7 @@
  * limitations under the License.
  */
 package org.apache.camel.component.mllp;
+
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.BindException;
@@ -28,7 +29,6 @@ import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
 
-
 import org.apache.camel.Exchange;
 import org.apache.camel.ExchangePattern;
 import org.apache.camel.Message;

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/Hl7Util.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/Hl7Util.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/Hl7Util.java
index 0c762cb..f4a8f9b 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/Hl7Util.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/Hl7Util.java
@@ -25,6 +25,7 @@ import static org.apache.camel.component.mllp.MllpEndpoint.SEGMENT_DELIMITER;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 public final class Hl7Util {
+
     static final Logger LOG = LoggerFactory.getLogger(Hl7Util.class);
 
     private Hl7Util() {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpBufferedSocketWriter.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpBufferedSocketWriter.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpBufferedSocketWriter.java
index 46db872..6f52543 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpBufferedSocketWriter.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpBufferedSocketWriter.java
@@ -31,6 +31,7 @@ import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_DATA;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 public class MllpBufferedSocketWriter extends MllpSocketWriter {
+
     static final int DEFAULT_SO_SNDBUF = 65535;
 
     ByteArrayOutputStream outputBuffer;

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketReader.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketReader.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketReader.java
index 7d10cce..d0c78e0 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketReader.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketReader.java
@@ -35,6 +35,7 @@ import org.slf4j.LoggerFactory;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 public class MllpSocketReader {
+
     final Socket socket;
     final int receiveTimeout;
     final int readTimeout;
@@ -55,7 +56,6 @@ public class MllpSocketReader {
         }
     }
 
-
     public byte[] readEnvelopedPayload() throws MllpException {
         return readEnvelopedPayload(null, null);
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketUtil.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketUtil.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketUtil.java
index fab33a8..d6a05d7 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketUtil.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketUtil.java
@@ -29,6 +29,7 @@ import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_DATA;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 public final class MllpSocketUtil {
+
     private static final Logger LOG = LoggerFactory.getLogger(MllpSocketUtil.class);
 
     private MllpSocketUtil() {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketWriter.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketWriter.java
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketWriter.java
index bd9515c..3f9310d 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketWriter.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/impl/MllpSocketWriter.java
@@ -32,6 +32,7 @@ import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_DATA;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 
 public class MllpSocketWriter {
+
     static final byte[] PAYLOAD_TERMINATOR;
 
     static {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java
b/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java
index c27c7f9..2d429c5 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerationException.java
@@ -17,6 +17,7 @@
 package org.apache.camel.processor.mllp;
 
 public class Hl7AcknowledgementGenerationException extends Exception {
+
     private final byte[] hl7Message;
 
     public Hl7AcknowledgementGenerationException(String message) {
@@ -34,7 +35,6 @@ public class Hl7AcknowledgementGenerationException extends Exception {
         this.hl7Message = hl7Message;
     }
 
-
     public byte[] getHl7Message() {
         return hl7Message;
     }

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerator.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerator.java
b/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerator.java
index 5c0013c..ddc1927 100644
--- a/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerator.java
+++ b/components/camel-mllp/src/main/java/org/apache/camel/processor/mllp/Hl7AcknowledgementGenerator.java
@@ -41,10 +41,9 @@ public class Hl7AcknowledgementGenerator implements Processor {
             + "MSA|AR|" + SEGMENT_DELIMITER
             + MESSAGE_TERMINATOR;
 
-
     @Override
     public void process(Exchange exchange) throws Exception {
-        Message message = null;
+        Message message;
         if (exchange.hasOut()) {
             message = exchange.getOut();
         } else {

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageValidationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageValidationTest.java
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageValidationTest.java
index 5c431e6..ba8ca8b 100644
--- a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageValidationTest.java
+++ b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageValidationTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.mllp;
 
+import java.util.concurrent.TimeUnit;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.LoggingLevel;
@@ -28,12 +30,9 @@ import org.apache.camel.test.junit.rule.mllp.MllpClientResource;
 import org.apache.camel.test.junit.rule.mllp.MllpJUnitResourceException;
 import org.apache.camel.test.junit.rule.mllp.MllpJUnitResourceTimeoutException;
 import org.apache.camel.test.junit4.CamelTestSupport;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.util.concurrent.TimeUnit;
-
 import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_BLOCK;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 import static org.apache.camel.test.mllp.Hl7MessageGenerator.generateMessage;
@@ -268,7 +267,7 @@ public class MllpTcpServerConsumerMessageValidationTest extends CamelTestSupport
         invalid.expectedMessageCount(1);
 
         for (int i = 0; i < messageCount; ++i) {
-            String message = (i == (messageCount/2))
+            String message = (i == (messageCount / 2))
                     ? generateMessage(i + 1).replaceFirst("EVN", "EVN" + START_OF_BLOCK)
                     : generateMessage(i + 1);
 
@@ -302,7 +301,7 @@ public class MllpTcpServerConsumerMessageValidationTest extends CamelTestSupport
         invalid.expectedMessageCount(1);
 
         for (int i = 0; i < messageCount; ++i) {
-            String message = (i == (messageCount/2))
+            String message = (i == (messageCount / 2))
                     ? generateMessage(i + 1).replaceFirst("EVN", "EVN" + END_OF_BLOCK)
                     : generateMessage(i + 1);
 

http://git-wip-us.apache.org/repos/asf/camel/blob/58e36d63/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTest.java
----------------------------------------------------------------------
diff --git a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTest.java
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTest.java
index 4060626..2ac159e 100644
--- a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTest.java
+++ b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.camel.component.mllp;
 
+import java.util.concurrent.TimeUnit;
+
 import org.apache.camel.CamelContext;
 import org.apache.camel.EndpointInject;
 import org.apache.camel.LoggingLevel;
@@ -31,8 +33,6 @@ import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Rule;
 import org.junit.Test;
 
-import java.util.concurrent.TimeUnit;
-
 import static org.apache.camel.component.mllp.MllpEndpoint.END_OF_BLOCK;
 import static org.apache.camel.component.mllp.MllpEndpoint.START_OF_BLOCK;
 import static org.apache.camel.test.mllp.Hl7MessageGenerator.generateMessage;
@@ -242,7 +242,7 @@ public class MllpTcpServerConsumerTest extends CamelTestSupport {
         timeout.expectedMessageCount(0);
 
         for (int i = 0; i < messageCount; ++i) {
-            String message = (i == (messageCount/2))
+            String message = (i == (messageCount / 2))
                     ? generateMessage(i + 1).replaceFirst("EVN", "EVN" + START_OF_BLOCK)
                     : generateMessage(i + 1);
 
@@ -272,7 +272,7 @@ public class MllpTcpServerConsumerTest extends CamelTestSupport {
         timeout.expectedMessageCount(0);
 
         for (int i = 0; i < messageCount; ++i) {
-            String message = (i == (messageCount/2))
+            String message = (i == (messageCount / 2))
                     ? generateMessage(i + 1).replaceFirst("EVN", "EVN" + END_OF_BLOCK)
                     : generateMessage(i + 1);
 


Mime
View raw message