Improve readability of empty collection checks

This commit is contained in:
kwonyonghyun
2024-10-15 03:49:39 +09:00
committed by Josh Cummings
parent 31bdaf720d
commit b8aa78829c
9 changed files with 16 additions and 16 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -73,7 +73,7 @@ public class ArrayMarshaller<E> implements Marshaller<ArrayTree<E>> {
* @param tree the tree to be marshalled
*/
public byte[] serialize(ArrayTree<E> tree) {
if ((tree == null) || (tree.size() == 0)) {
if ((tree == null) || tree.isEmpty()) {
return EMPTY_TREE;
}