diff --git a/mihxil-math/src/main/java/org/meeuw/math/abstractalgebra/AlgebraicStructure.java b/mihxil-math/src/main/java/org/meeuw/math/abstractalgebra/AlgebraicStructure.java index 495c565f..b3927f77 100644 --- a/mihxil-math/src/main/java/org/meeuw/math/abstractalgebra/AlgebraicStructure.java +++ b/mihxil-math/src/main/java/org/meeuw/math/abstractalgebra/AlgebraicStructure.java @@ -145,7 +145,7 @@ default void cayleyTable(AlgebraicBinaryOperator op, Consumer lineCons Streamable streamable = (Streamable) this; streamable.stream().forEach(e -> line.add(e.toString())); - lineConsumer.accept(line.toArray(String[]::new)); + lineConsumer.accept(line.toArray(new String[line.size()])); line.clear(); streamable.stream().forEach(e1 -> { line.add(e1.toString());