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

jmclean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-plc4x.git

commit a2b350deaf5e0286f62be65ce3cc465a6eba8538
Author: Justin Mclean <jmcl...@apache.org>
AuthorDate: Tue Feb 20 10:57:40 2018 +1100

    one statement per line (sonarcube)
---
 .../commands/ADSAddDeviceNotificationResponse.java | 13 ++++++---
 .../ADSDeleteDeviceNotificationRequest.java        |  9 ++++--
 .../ADSDeleteDeviceNotificationResponse.java       |  9 ++++--
 .../api/commands/ADSDeviceNotificationRequest.java | 16 ++++++----
 .../api/commands/ADSReadDeviceInfoResponse.java    | 22 +++++++++-----
 .../java/ads/api/commands/ADSReadRequest.java      | 16 ++++++----
 .../java/ads/api/commands/ADSReadResponse.java     | 16 ++++++----
 .../ads/api/commands/ADSReadStateResponse.java     |  9 ++++--
 .../java/ads/api/commands/ADSReadWriteRequest.java | 22 +++++++++-----
 .../ads/api/commands/ADSReadWriteResponse.java     | 15 ++++++----
 .../ads/api/commands/ADSWriteControlRequest.java   | 19 ++++++++----
 .../ads/api/commands/ADSWriteControlResponse.java  |  9 ++++--
 .../java/ads/api/commands/ADSWriteRequest.java     | 19 ++++++++----
 .../java/ads/api/commands/ADSWriteResponse.java    |  9 ++++--
 .../java/ads/api/commands/UnknownCommand.java      |  9 ++++--
 .../api/commands/types/AdsNotificationSample.java  | 13 ++++++---
 .../ads/api/commands/types/AdsStampHeader.java     | 13 ++++++---
 .../java/ads/api/commands/types/TimeStamp.java     | 34 +++++++++++++---------
 .../plc4x/java/ads/api/generic/AMSHeader.java      | 31 +++++++++++++-------
 .../plc4x/java/ads/api/generic/AMSTCPHeader.java   |  6 ++--
 .../plc4x/java/ads/api/generic/AMSTCPPacket.java   |  9 ++++--
 .../apache/plc4x/java/ads/api/util/ByteValue.java  |  6 ++--
 .../java/ads/api/util/UnsignedIntLEByteValue.java  |  9 ++++--
 .../ads/api/util/UnsignedShortLEByteValue.java     |  9 ++++--
 24 files changed, 230 insertions(+), 112 deletions(-)

diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSAddDeviceNotificationResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSAddDeviceNotificationResponse.java
index d86666a..db59dd6 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSAddDeviceNotificationResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSAddDeviceNotificationResponse.java
@@ -81,13 +81,18 @@ public class ADSAddDeviceNotificationResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSAddDeviceNotificationResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSAddDeviceNotificationResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSAddDeviceNotificationResponse that = 
(ADSAddDeviceNotificationResponse) o;
 
-        if (!result.equals(that.result)) return false;
+        if (!result.equals(that.result))
+            return false;
+        
         return notificationHandle.equals(that.notificationHandle);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationRequest.java
index fb400b3..44f0258 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationRequest.java
@@ -78,9 +78,12 @@ public class ADSDeleteDeviceNotificationRequest extends 
ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSDeleteDeviceNotificationRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSDeleteDeviceNotificationRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSDeleteDeviceNotificationRequest that = 
(ADSDeleteDeviceNotificationRequest) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationResponse.java
index 92b2b2b..14de8ff 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeleteDeviceNotificationResponse.java
@@ -69,9 +69,12 @@ public class ADSDeleteDeviceNotificationResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSDeleteDeviceNotificationResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSDeleteDeviceNotificationResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSDeleteDeviceNotificationResponse that = 
(ADSDeleteDeviceNotificationResponse) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeviceNotificationRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeviceNotificationRequest.java
index 7297e3c..24fa24b 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeviceNotificationRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSDeviceNotificationRequest.java
@@ -123,14 +123,20 @@ public class ADSDeviceNotificationRequest extends 
ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSDeviceNotificationRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSDeviceNotificationRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSDeviceNotificationRequest that = (ADSDeviceNotificationRequest) o;
 
-        if (!getLength().equals(that.getLength())) return false;
-        if (!stamps.equals(that.stamps)) return false;
+        if (!getLength().equals(that.getLength()))
+            return false;
+        if (!stamps.equals(that.stamps))
+            return false;
+        
         return adsStampHeaders.equals(that.adsStampHeaders);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadDeviceInfoResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadDeviceInfoResponse.java
index 9f19ece..3f11b28 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadDeviceInfoResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadDeviceInfoResponse.java
@@ -109,16 +109,24 @@ public class ADSReadDeviceInfoResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadDeviceInfoResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadDeviceInfoResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadDeviceInfoResponse that = (ADSReadDeviceInfoResponse) o;
 
-        if (!result.equals(that.result)) return false;
-        if (!majorVersion.equals(that.majorVersion)) return false;
-        if (!minorVersion.equals(that.minorVersion)) return false;
-        if (!version.equals(that.version)) return false;
+        if (!result.equals(that.result))
+            return false;
+        if (!majorVersion.equals(that.majorVersion))
+            return false;
+        if (!minorVersion.equals(that.minorVersion))
+            return false;
+        if (!version.equals(that.version))
+            return false;
+        
         return device.equals(that.device);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadRequest.java
index 6ba73ed..880f3f3 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadRequest.java
@@ -104,14 +104,20 @@ public class ADSReadRequest extends ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadRequest that = (ADSReadRequest) o;
 
-        if (!indexGroup.equals(that.indexGroup)) return false;
-        if (!indexOffset.equals(that.indexOffset)) return false;
+        if (!indexGroup.equals(that.indexGroup))
+            return false;
+        if (!indexOffset.equals(that.indexOffset))
+            return false;
+        
         return length.equals(that.length);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadResponse.java
index 2d6686d..8a38d58 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadResponse.java
@@ -96,14 +96,20 @@ public class ADSReadResponse extends ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadResponse that = (ADSReadResponse) o;
 
-        if (!result.equals(that.result)) return false;
-        if (!getLength().equals(that.getLength())) return false;
+        if (!result.equals(that.result))
+            return false;
+        if (!getLength().equals(that.getLength()))
+            return false;
+        
         return data.equals(that.data);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadStateResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadStateResponse.java
index 20d08fc..53e8985 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadStateResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadStateResponse.java
@@ -69,9 +69,12 @@ public class ADSReadStateResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadStateResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadStateResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadStateResponse that = (ADSReadStateResponse) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteRequest.java
index 45847eb..ef82e33 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteRequest.java
@@ -130,16 +130,24 @@ public class ADSReadWriteRequest extends 
ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadWriteRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadWriteRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadWriteRequest that = (ADSReadWriteRequest) o;
 
-        if (!indexGroup.equals(that.indexGroup)) return false;
-        if (!indexOffset.equals(that.indexOffset)) return false;
-        if (!readLength.equals(that.readLength)) return false;
-        if (!getWriteLength().equals(that.getWriteLength())) return false;
+        if (!indexGroup.equals(that.indexGroup))
+            return false;
+        if (!indexOffset.equals(that.indexOffset))
+            return false;
+        if (!readLength.equals(that.readLength))
+            return false;
+        if (!getWriteLength().equals(that.getWriteLength()))
+            return false;
+        
         return data.equals(that.data);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteResponse.java
index 0ac55c2..8328882 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSReadWriteResponse.java
@@ -98,14 +98,19 @@ public class ADSReadWriteResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSReadWriteResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSReadWriteResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSReadWriteResponse that = (ADSReadWriteResponse) o;
 
-        if (!result.equals(that.result)) return false;
-        if (!getLength().equals(that.getLength())) return false;
+        if (!result.equals(that.result))
+            return false;
+        if (!getLength().equals(that.getLength()))
+            return false;
         return data.equals(that.data);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlRequest.java
index b5cf50a..d2f7121 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlRequest.java
@@ -122,15 +122,22 @@ public class ADSWriteControlRequest extends 
ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSWriteControlRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSWriteControlRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSWriteControlRequest that = (ADSWriteControlRequest) o;
 
-        if (!adsState.equals(that.adsState)) return false;
-        if (!deviceState.equals(that.deviceState)) return false;
-        if (!getLength().equals(that.getLength())) return false;
+        if (!adsState.equals(that.adsState))
+            return false;
+        if (!deviceState.equals(that.deviceState))
+            return false;
+        if (!getLength().equals(that.getLength()))
+            return false;
+        
         return data.equals(that.data);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlResponse.java
index 8bbbede..86e2b0a 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteControlResponse.java
@@ -68,9 +68,12 @@ public class ADSWriteControlResponse extends 
ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSWriteControlResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSWriteControlResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSWriteControlResponse that = (ADSWriteControlResponse) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteRequest.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteRequest.java
index d103ad5..6ce66a6 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteRequest.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteRequest.java
@@ -120,15 +120,22 @@ public class ADSWriteRequest extends ADSAbstractRequest {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSWriteRequest)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSWriteRequest))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSWriteRequest that = (ADSWriteRequest) o;
 
-        if (!indexGroup.equals(that.indexGroup)) return false;
-        if (!indexOffset.equals(that.indexOffset)) return false;
-        if (!getLength().equals(that.getLength())) return false;
+        if (!indexGroup.equals(that.indexGroup))
+            return false;
+        if (!indexOffset.equals(that.indexOffset))
+            return false;
+        if (!getLength().equals(that.getLength()))
+            return false;
+        
         return data.equals(that.data);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteResponse.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteResponse.java
index fa79968..fc3de95 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteResponse.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/ADSWriteResponse.java
@@ -69,9 +69,12 @@ public class ADSWriteResponse extends ADSAbstractResponse {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ADSWriteResponse)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ADSWriteResponse))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         ADSWriteResponse that = (ADSWriteResponse) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/UnknownCommand.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/UnknownCommand.java
index 586136b..4eba85d 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/UnknownCommand.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/UnknownCommand.java
@@ -60,9 +60,12 @@ public class UnknownCommand extends AMSTCPPacket {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof UnknownCommand)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof UnknownCommand))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         UnknownCommand that = (UnknownCommand) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsNotificationSample.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsNotificationSample.java
index 4fd7fb1..325b6e3 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsNotificationSample.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsNotificationSample.java
@@ -83,13 +83,18 @@ public class AdsNotificationSample implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof AdsNotificationSample)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof AdsNotificationSample))
+            return false;
 
         AdsNotificationSample that = (AdsNotificationSample) o;
 
-        if (!notificationHandle.equals(that.notificationHandle)) return false;
-        if (!data.equals(that.data)) return false;
+        if (!notificationHandle.equals(that.notificationHandle))
+            return false;
+        if (!data.equals(that.data))
+            return false;
+
         return getSampleSize().equals(that.getSampleSize());
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsStampHeader.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsStampHeader.java
index 74d36a1..2c9b56b 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsStampHeader.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/AdsStampHeader.java
@@ -80,13 +80,18 @@ public class AdsStampHeader implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof AdsStampHeader)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof AdsStampHeader))
+            return false;
 
         AdsStampHeader that = (AdsStampHeader) o;
 
-        if (!timeStamp.equals(that.timeStamp)) return false;
-        if (!samples.equals(that.samples)) return false;
+        if (!timeStamp.equals(that.timeStamp))
+            return false;
+        if (!samples.equals(that.samples))
+            return false;
+        
         return adsNotificationSamples.equals(that.adsNotificationSamples);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/TimeStamp.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/TimeStamp.java
index 0077abf..d46fecf 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/TimeStamp.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/commands/types/TimeStamp.java
@@ -30,7 +30,7 @@ public class TimeStamp extends ByteValue {
     /**
      * @see <a 
href="https://github.com/java-native-access/jna/blob/master/contrib/platform/src/com/sun/jna/platform/win32/WinBase.java";>java-native-access
 WinBase</a>
      */
-    public final static BigInteger EPOCH_DIFF_IN_MILLIS = 
BigInteger.valueOf((369L * 365L + 89L) * 86400L * 1000L);
+    public static final BigInteger EPOCH_DIFF_IN_MILLIS = 
BigInteger.valueOf((369L * 365L + 89L) * 86400L * 1000L);
 
     public static final int NUM_BYTES = 8;
 
@@ -60,23 +60,28 @@ public class TimeStamp extends ByteValue {
         bigIntegerValue = value;
     }
 
+    private static byte checkByte(byte[] valueBytes, int length, int i) {
+        return length > i ? valueBytes[i] : 0;
+    }
+    
     private static byte[] ofBigInteger(BigInteger value) {
         byte[] valueBytes = value.toByteArray();
         int length = valueBytes.length;
         return ByteBuffer.allocate(NUM_BYTES)
             // LE
-            .put(length > 7 ? valueBytes[7] : 0)
-            .put(length > 6 ? valueBytes[6] : 0)
-            .put(length > 5 ? valueBytes[5] : 0)
-            .put(length > 4 ? valueBytes[4] : 0)
-
-            .put(length > 3 ? valueBytes[3] : 0)
-            .put(length > 2 ? valueBytes[2] : 0)
-            .put(length > 1 ? valueBytes[1] : 0)
-            .put(length > 0 ? valueBytes[0] : 0)
+            .put(checkByte(valueBytes, length, 7))
+            .put(checkByte(valueBytes, length, 6))
+            .put(checkByte(valueBytes, length, 5))
+            .put(checkByte(valueBytes, length, 4))
+
+            .put(checkByte(valueBytes, length, 3))
+            .put(checkByte(valueBytes, length, 2))
+            .put(checkByte(valueBytes, length, 1))
+            .put(checkByte(valueBytes, length, 0))
             .array();
     }
 
+
     public static TimeStamp of(BigInteger value) {
         return new TimeStamp(javaToWinTime(value));
     }
@@ -141,9 +146,12 @@ public class TimeStamp extends ByteValue {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof TimeStamp)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof TimeStamp))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         TimeStamp timeStamp = (TimeStamp) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSHeader.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSHeader.java
index ffe42a8..72bb6f0 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSHeader.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSHeader.java
@@ -158,19 +158,30 @@ public class AMSHeader implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof AMSHeader)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof AMSHeader))
+            return false;
 
         AMSHeader amsHeader = (AMSHeader) o;
 
-        if (!targetAmsNetId.equals(amsHeader.targetAmsNetId)) return false;
-        if (!targetAmsPort.equals(amsHeader.targetAmsPort)) return false;
-        if (!sourceAmsNetId.equals(amsHeader.sourceAmsNetId)) return false;
-        if (!sourceAmsPort.equals(amsHeader.sourceAmsPort)) return false;
-        if (commandId != amsHeader.commandId) return false;
-        if (!stateFlags.equals(amsHeader.stateFlags)) return false;
-        if (!code.equals(amsHeader.code)) return false;
-        if (!invokeId.equals(amsHeader.invokeId)) return false;
+        if (!targetAmsNetId.equals(amsHeader.targetAmsNetId))
+            return false;
+        if (!targetAmsPort.equals(amsHeader.targetAmsPort))
+            return false;
+        if (!sourceAmsNetId.equals(amsHeader.sourceAmsNetId))
+            return false;
+        if (!sourceAmsPort.equals(amsHeader.sourceAmsPort))
+            return false;
+        if (commandId != amsHeader.commandId)
+            return false;
+        if (!stateFlags.equals(amsHeader.stateFlags))
+            return false;
+        if (!code.equals(amsHeader.code))
+            return false;
+        if (!invokeId.equals(amsHeader.invokeId))
+            return false;
+        
         return getDataLength().equals(((AMSHeader) o).getDataLength());
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPHeader.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPHeader.java
index fb609f8..d7d7e0a 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPHeader.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPHeader.java
@@ -103,8 +103,10 @@ public class AMSTCPHeader implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof AMSTCPHeader)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof AMSTCPHeader))
+            return false;
 
         AMSTCPHeader that = (AMSTCPHeader) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPPacket.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPPacket.java
index 3016cd9..cb1bafd 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPPacket.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/generic/AMSTCPPacket.java
@@ -81,12 +81,15 @@ public abstract class AMSTCPPacket implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof AMSTCPPacket)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof AMSTCPPacket))
+            return false;
 
         AMSTCPPacket that = (AMSTCPPacket) o;
 
-        if (!amsTcpHeader.equals(that.amsTcpHeader)) return false;
+        if (!amsTcpHeader.equals(that.amsTcpHeader))
+            return false;
         return amsHeader.equals(that.amsHeader);
     }
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
index 0d9af49..e7d5bbe 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/ByteValue.java
@@ -66,8 +66,10 @@ public class ByteValue implements ByteReadable {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof ByteValue)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof ByteValue))
+            return false;
 
         ByteValue byteValue = (ByteValue) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java
index 9b0f394..820d9a3 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedIntLEByteValue.java
@@ -69,9 +69,12 @@ public abstract class UnsignedIntLEByteValue extends 
ByteValue {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof UnsignedIntLEByteValue)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof UnsignedIntLEByteValue))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         UnsignedIntLEByteValue that = (UnsignedIntLEByteValue) o;
 
diff --git 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedShortLEByteValue.java
 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedShortLEByteValue.java
index f5752af..01fe3df 100644
--- 
a/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedShortLEByteValue.java
+++ 
b/plc4j/protocols/ads/src/main/java/org/apache/plc4x/java/ads/api/util/UnsignedShortLEByteValue.java
@@ -67,9 +67,12 @@ public abstract class UnsignedShortLEByteValue extends 
ByteValue {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o) return true;
-        if (!(o instanceof UnsignedShortLEByteValue)) return false;
-        if (!super.equals(o)) return false;
+        if (this == o)
+            return true;
+        if (!(o instanceof UnsignedShortLEByteValue))
+            return false;
+        if (!super.equals(o))
+            return false;
 
         UnsignedShortLEByteValue that = (UnsignedShortLEByteValue) o;
 

-- 
To stop receiving notification emails like this one, please contact
jmcl...@apache.org.

Reply via email to