Skip to content

Commit

Permalink
condenses instanceof and null check
Browse files Browse the repository at this point in the history
Co-authored-by: Bogdan Pintea <[email protected]>
  • Loading branch information
not-napoleon and bpintea authored Dec 8, 2023
1 parent ba378e6 commit b870b3f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -955,8 +955,7 @@ public TypedData(Object data, String name) {

@Override
public String toString() {
if (type == DataTypes.UNSIGNED_LONG && data != null) {
if (data instanceof Long longData) {
if (type == DataTypes.UNSIGNED_LONG && data instanceof Long longData) {
return type.toString() + "(" + NumericUtils.unsignedLongAsBigInteger(longData).toString() + ")";
}
}
Expand Down

0 comments on commit b870b3f

Please sign in to comment.