Skip to content

Commit

Permalink
fixed wrong padding of strings.
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Jun 13, 2018
1 parent 572e16b commit 4b7fc7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ public long getCalculatedLength() {

@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;

Expand All @@ -95,7 +98,7 @@ public int hashCode() {
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") +
"} ";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ public long getCalculatedLength() {

@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;

Expand All @@ -95,7 +98,7 @@ public int hashCode() {
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") +
"}";
}
}

0 comments on commit 4b7fc7e

Please sign in to comment.