This is an automated email from the ASF dual-hosted git repository. erans pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-math.git
commit e7002a02150cf4eee8ca1bb51bc7ce735eefddd0 Author: Gilles Sadowski <gillese...@gmail.com> AuthorDate: Fri Dec 31 01:59:20 2021 +0100 MATH-1594: Remove "Serializable". --- .../distribution/RealDistributionAbstractTest.java | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/distribution/RealDistributionAbstractTest.java b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/distribution/RealDistributionAbstractTest.java index b96aff2..6e76e73 100644 --- a/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/distribution/RealDistributionAbstractTest.java +++ b/commons-math-legacy/src/test/java/org/apache/commons/math4/legacy/distribution/RealDistributionAbstractTest.java @@ -471,25 +471,4 @@ public abstract class RealDistributionAbstractTest { protected void setTolerance(double tolerance) { this.tolerance = tolerance; } - - /** - * Serialization and deserialization loop of the {@link #distribution}. - */ - private ContinuousDistribution deepClone() - throws IOException, - ClassNotFoundException { - // Serialize to byte array. - final ByteArrayOutputStream bOut = new ByteArrayOutputStream(); - final ObjectOutputStream oOut = new ObjectOutputStream(bOut); - oOut.writeObject(distribution); - final byte[] data = bOut.toByteArray(); - - // Deserialize from byte array. - final ByteArrayInputStream bIn = new ByteArrayInputStream(data); - final ObjectInputStream oIn = new ObjectInputStream(bIn); - final Object clone = oIn.readObject(); - oIn.close(); - - return (ContinuousDistribution) clone; - } }