commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luc Maisonobe (Commented) (JIRA)" <>
Subject [jira] [Commented] (MATH-742) Please make PolynomialSplineFunction Serializable
Date Sun, 19 Feb 2012 13:28:34 GMT


Luc Maisonobe commented on MATH-742:

bq. I guess that the most trivial problem is serializing with some version of the library
and deserializing with another where the internal structure has changed in the meantime (e.g.
substituting one instance variable with another that would provide the same basic functionality).

I think we can simply say this is not supported. Serialization should not be used for long
time storage, and even if it can be used for distributed computation with different versions
between client and server, we can simply say we don't support it.

bq. Those concerns might be far-fetched and we are totally entitled to ignore them in standalone
applications but in the case of a library, we should not presume of the innocuousness of anything
we put in.

+1 for the concerns of a library, but there are many cases when a simple "implements Serializable"
is sufficient and does not imply too much work.

Could we go for a case by case policy ? There are some classes where serialization could help
users and not be too cumbersome. This is a trade off between forbidding serialization completely
and supporting it for all classes in a guaranteed way with cross-version support.
> 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