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

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

commit 4b7fc7e9a7331eb5c5fd9cb4b07e1e858be890e5
Author: Sebastian Rühl <sru...@apache.org>
AuthorDate: Wed Jun 13 10:05:47 2018 +0200

    fixed wrong padding of strings.
---
 .../plc4x/java/ads/api/util/UnsignedIntLEByteValue.java       | 11 +++++++----
 .../plc4x/java/ads/api/util/UnsignedShortLEByteValue.java     | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

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 1740c3e..bedab38 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
@@ -72,12 +72,15 @@ public abstract class UnsignedIntLEByteValue extends 
ByteValue {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (!(o instanceof UnsignedIntLEByteValue))
+        }
+        if (!(o instanceof UnsignedIntLEByteValue)) {
             return false;
-        if (!super.equals(o))
+        }
+        if (!super.equals(o)) {
             return false;
+        }
 
         UnsignedIntLEByteValue that = (UnsignedIntLEByteValue) o;
 
@@ -95,7 +98,7 @@ public abstract class UnsignedIntLEByteValue extends 
ByteValue {
     public String toString() {
         return super.toString() + "{" +
             "longValue=" + getAsLong() +
-            ",hexValue=0x" + leftPad(toHexString(getAsLong()), 
UNSIGNED_INT_LE_NUM_BYTES, "0") +
+            ",hexValue=0x" + leftPad(toHexString(getAsLong()), 
UNSIGNED_INT_LE_NUM_BYTES * 2, "0") +
             "} ";
     }
 }
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 70b59f0..bce8017 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
@@ -72,12 +72,15 @@ public abstract class UnsignedShortLEByteValue extends 
ByteValue {
 
     @Override
     public boolean equals(Object o) {
-        if (this == o)
+        if (this == o) {
             return true;
-        if (!(o instanceof UnsignedShortLEByteValue))
+        }
+        if (!(o instanceof UnsignedShortLEByteValue)) {
             return false;
-        if (!super.equals(o))
+        }
+        if (!super.equals(o)) {
             return false;
+        }
 
         UnsignedShortLEByteValue that = (UnsignedShortLEByteValue) o;
 
@@ -95,7 +98,7 @@ public abstract class UnsignedShortLEByteValue extends 
ByteValue {
     public String toString() {
         return super.toString() + "{" +
             "intValue=" + getAsInt() +
-            ",hexValue=0x" + leftPad(toHexString(getAsInt()), 
UNSIGNED_SHORT_LE_NUM_BYTES, "0") +
+            ",hexValue=0x" + leftPad(toHexString(getAsInt()), 
UNSIGNED_SHORT_LE_NUM_BYTES * 2, "0") +
             "}";
     }
 }

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

Reply via email to