Don't clone the result of `toByteArray`, which already [allocates a new array](https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/io/ByteArrayOutputStream.html#toByteArray()).
@@ -122,7 +122,7 @@ public class InMemoryFileInfo extends FileInfo {
@Override
public synchronized void flush() {
- receiver.accept(toByteArray().clone());
+ receiver.accept(toByteArray());
}
}
}
