Improve readability of empty collection checks
This commit is contained in:
committed by
Josh Cummings
parent
31bdaf720d
commit
b8aa78829c
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user