diff --git a/src/org/redkale/util/Sheet.java b/src/org/redkale/util/Sheet.java index c0374961e..f05f803af 100644 --- a/src/org/redkale/util/Sheet.java +++ b/src/org/redkale/util/Sheet.java @@ -145,6 +145,6 @@ public class Sheet implements java.io.Serializable, Iterable { } public E[] toArray(IntFunction generator) { - return (this.rows == null) ? new ArrayList().toArray(generator.apply(0)) : this.rows.toArray(generator.apply(0)); + return (this.rows == null) ? new ArrayList().toArray(generator.apply(0)) : this.rows.toArray(generator.apply(this.rows.size())); } }