commons-issues mailing list archives

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


Neil Roeth commented on MATH-742:


In many cases, the default serialization mechanism is perfectly adequate, as in this case
where no one, not even the library maintainers, actually needs to do anything nearly as complex
as this code you supplied.  Is there any possible problem that adding "implements Serializable"
in this one class could cause?  The only possible problem you raised is that someone, somewhere,
might possibly save this class as long term storage.  How about you make this one class Serializable,
and if you get a bug report that it doesn't work when someone uses it for long term storage,
you just tell that person "Don't do that"?  Meanwhile, the rest of us can go ahead and use
the Serializable class properly, in exactly the circumstances that you stated serialization
was for, i.e., passing data around in distributed processing.

There is no reason to saddle my simple, isolated issue with the burden of proving that the
Commons Math team must commit to making the whole library Serializable.  It doesn't have to
commit to that. It is perfectly fine to make only part of the library Serializable.  The last
time I checked, only part of the Java API was Serializable.  Just add "implements Serializable"
to this class.  Then, put a big, bold statement on the web page that says, "We made some parts
of Commons Math Serializable where it was trivial to do so, but we do not plan at this time
to tackle the parts that are not trivial. Patches to do the latter are welcome, as long as
they do it IN THE RIGHT WAY."  Then declare success and be happy that you made the library
more useful.
> 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