Skip to content

Commit

Permalink
Have GlideString log byte array hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jduo committed Jul 4, 2024
1 parent bb32f85 commit e1c033e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions java/client/src/main/java/glide/api/models/GlideString.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,10 @@ public String getString() {
return string;
}

assert canConvertToString() : "Value cannot be represented as a string";
return string;
if (canConvertToString()) {
return string;
}
return String.format("Value not convertible to string: byte[] %d", Arrays.hashCode(bytes));
}

public int compareTo(GlideString o) {
Expand Down

0 comments on commit e1c033e

Please sign in to comment.