commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gilles (Commented) (JIRA)" <>
Subject [jira] [Commented] (MATH-742) Please make PolynomialSplineFunction Serializable
Date Fri, 10 Feb 2012 12:40:59 GMT


Gilles commented on MATH-742:

In principle, I'm against applying the {{Serializable}} pseudo-interface.

In this case, as with most of what is in CM, we deal with an object whose main purpose is
to _compute_ something, not to store data. I know that the border between data and computation
is not clear-cut, especially in the OO paradigm...

But the main rationale is to not induce the users to think that it is good practice to store
data using the default serialization system. If I'm not mistaken, this feature was meant to
ease some of the plumbing needed for distributed applications.
"Serializable" is certainly not to be taken as a substitute for a stable API aimed at safe
"long-term" storage. It is for this reason that I think that the default should be to *not*
implement "Serializable" unless there is a good clear case (i.e. not one that displays a bad
practice) that needs it. E.g. there was the convincing case for the exception infrastructure
(cf. package "exception.util") to be "Serializable": Whenever some remote application using
CM needed to report a failure and could not unless the given exception could be serialized.

> Please make PolynomialSplineFunction Serializable
> -------------------------------------------------
>                 Key: MATH-742
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 2.2
>            Reporter: Neil Roeth
>            Priority: Minor
>         Attachments:
> PolynomialSplineFunction is not Serializable, while the very similar PolynomialFunction
class in the same package is. All that needs to be done is to add the import:
> {{import;}}
> and change this:
> {{public class PolynomialSplineFunction implements DifferentiableUnivariateRealFunction}}
> to this:
> {{public class PolynomialSplineFunction implements DifferentiableUnivariateRealFunction,
> I made exactly that modification to a local copy and it serialized successfully.  Before
the change, I got serialization errors.
> Thanks.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message