From 8e0b98bf6bd30713d94b72c7c410addb26c3c472 Mon Sep 17 00:00:00 2001 From: Luc Maisonobe Date: Mon, 2 Nov 2015 16:20:54 +0100 Subject: [PATCH] reintroduced modifiers needed for serialization. --- checkstyle.xml | 5 +++++ .../ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java | 5 ++++- .../math4/ode/nonstiff/DormandPrince54StepInterpolator.java | 5 ++++- .../math4/ode/nonstiff/DormandPrince853StepInterpolator.java | 5 ++++- .../commons/math4/ode/nonstiff/EulerStepInterpolator.java | 5 ++++- .../commons/math4/ode/nonstiff/GillStepInterpolator.java | 5 ++++- .../ode/nonstiff/GraggBulirschStoerStepInterpolator.java | 5 ++++- .../math4/ode/nonstiff/HighamHall54StepInterpolator.java | 5 ++++- .../commons/math4/ode/nonstiff/LutherStepInterpolator.java | 5 ++++- .../commons/math4/ode/nonstiff/MidpointStepInterpolator.java | 5 ++++- .../math4/ode/nonstiff/ThreeEighthesStepInterpolator.java | 5 ++++- 11 files changed, 45 insertions(+), 10 deletions(-) diff --git a/checkstyle.xml b/checkstyle.xml index c35f8bacd..af59d2be8 100644 --- a/checkstyle.xml +++ b/checkstyle.xml @@ -189,6 +189,11 @@ + + + + + diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java index dd23975ff..d7704d77d 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/ClassicalRungeKuttaStepInterpolator.java @@ -68,8 +68,11 @@ class ClassicalRungeKuttaStepInterpolator * interpolators by cloning an uninitialized model and latter initializing * the copy. */ - ClassicalRungeKuttaStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public ClassicalRungeKuttaStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54StepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54StepInterpolator.java index 815b9b8ab..a13d6d029 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54StepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince54StepInterpolator.java @@ -97,7 +97,9 @@ class DormandPrince54StepInterpolator * prototyping design pattern to create the step interpolators by * cloning an uninitialized model and latter initializing the copy. */ - DormandPrince54StepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public DormandPrince54StepInterpolator() { super(); v1 = null; v2 = null; @@ -105,6 +107,7 @@ class DormandPrince54StepInterpolator v4 = null; vectorsInitialized = false; } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853StepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853StepInterpolator.java index 9a17fe1ad..5e6953cce 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853StepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/DormandPrince853StepInterpolator.java @@ -227,12 +227,15 @@ class DormandPrince853StepInterpolator * prototyping design pattern to create the step interpolators by * cloning an uninitialized model and latter initializing the copy. */ - DormandPrince853StepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public DormandPrince853StepInterpolator() { super(); yDotKLast = null; v = null; vectorsInitialized = false; } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerStepInterpolator.java index c31db8e84..74691b5aa 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/EulerStepInterpolator.java @@ -59,8 +59,11 @@ class EulerStepInterpolator * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - EulerStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public EulerStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/GillStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/GillStepInterpolator.java index 3a7c03462..435c5b2ac 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/GillStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/GillStepInterpolator.java @@ -75,8 +75,11 @@ class GillStepInterpolator * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - GillStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public GillStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/GraggBulirschStoerStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/GraggBulirschStoerStepInterpolator.java index 6afdf37c0..a991221e1 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/GraggBulirschStoerStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/GraggBulirschStoerStepInterpolator.java @@ -107,13 +107,16 @@ class GraggBulirschStoerStepInterpolator * This constructor should not be used directly, it is only intended * for the serialization process. */ - GraggBulirschStoerStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public GraggBulirschStoerStepInterpolator() { y0Dot = null; y1 = null; y1Dot = null; yMidDots = null; resetTables(-1); } + // CHECKSTYLE: resume RedundantModifier /** Simple constructor. * @param y reference to the integrator array holding the current state diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54StepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54StepInterpolator.java index 01a00d04d..4e40f811c 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54StepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/HighamHall54StepInterpolator.java @@ -45,9 +45,12 @@ class HighamHall54StepInterpolator * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - HighamHall54StepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public HighamHall54StepInterpolator() { super(); } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherStepInterpolator.java index e4d212b22..e4eedd286 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/LutherStepInterpolator.java @@ -51,8 +51,11 @@ class LutherStepInterpolator extends RungeKuttaStepInterpolator { * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - LutherStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public LutherStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointStepInterpolator.java index 38393cab7..45014bbc5 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/MidpointStepInterpolator.java @@ -61,8 +61,11 @@ class MidpointStepInterpolator * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - MidpointStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public MidpointStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep diff --git a/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesStepInterpolator.java b/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesStepInterpolator.java index 2dba16e66..c5a20e0bd 100644 --- a/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesStepInterpolator.java +++ b/src/main/java/org/apache/commons/math4/ode/nonstiff/ThreeEighthesStepInterpolator.java @@ -71,8 +71,11 @@ class ThreeEighthesStepInterpolator * to create the step interpolators by cloning an uninitialized model * and later initializing the copy. */ - ThreeEighthesStepInterpolator() { + // CHECKSTYLE: stop RedundantModifier + // the public modifier here is needed for serialization + public ThreeEighthesStepInterpolator() { } + // CHECKSTYLE: resume RedundantModifier /** Copy constructor. * @param interpolator interpolator to copy from. The copy is a deep