Skip to content

Commit

Permalink
Fixed improper instanceof check
Browse files Browse the repository at this point in the history
  • Loading branch information
Renanse committed Nov 6, 2024
1 parent 5091cd5 commit 303e1ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,12 +871,12 @@ private void tryToWriteValue(final Object value) throws IOException {
return;
}
if (value instanceof List<?> list) {
if (list.size() == 0) {
if (list.isEmpty()) {
write(BinaryClassField.UNHANDLED, "type", (byte) -1);
return;
}
final Object first = list.get(0);
if (list instanceof ByteBuffer) {
if (first instanceof ByteBuffer) {
write(BinaryClassField.BYTEBUFFER_ARRAYLIST, "type", (byte) -1);
writeByteBufferList((List<ByteBuffer>) value, "value", null);
return;
Expand Down

0 comments on commit 303e1ce

Please sign in to comment.