Skip to content

Commit

Permalink
fix(java): DeserializationException#getMessage call (#1830)
Browse files Browse the repository at this point in the history
## What does this PR do?

Fix failure on `DeserializationException#getMessage`

```
java.lang.StringIndexOutOfBoundsException: Range [311, 2) out of bounds for length 313
	at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
	at java.base/jdk.internal.util.Preconditions$1.apply(Unknown Source)
	at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
	at java.base/jdk.internal.util.Preconditions$4.apply(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.outOfBounds(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Unknown Source)
	at java.base/jdk.internal.util.Preconditions.checkFromToIndex(Unknown Source)
	at java.base/java.lang.AbstractStringBuilder.delete(Unknown Source)
	at java.base/java.lang.StringBuilder.delete(Unknown Source)
	at org.apache.fury.exception.DeserializationException.getMessage(DeserializationException.java:59)
```

## Related issues

N/A

## Does this PR introduce any user-facing change?

N/A

## Benchmark

N/A
  • Loading branch information
yoohaemin authored Sep 7, 2024
1 parent d8738f9 commit 15096f5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public String getMessage() {
for (Object readObject : readObjects) {
builder.append(readObject == null ? null : readObject.getClass()).append(", ");
}
builder.delete(builder.length() - 2, 2);
builder.delete(builder.length() - 2, builder.length());
builder.append("]");
return builder.toString();
}
Expand Down

0 comments on commit 15096f5

Please sign in to comment.