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 15:56:59 GMT


Gilles commented on MATH-742:

bq. this completely prevents them from being used as fields in user-defined classes which
may need to be serializable

The issue (and my question) is: Is this field needed in the serialization? If not, the user
can add the "transient" keyword to the variable instance declaration.
If it is needed, then again, is "Serializable" the correct way? That it is the quick-and-dirty
solution, I know.

Finally, if we don't care about advertising good (or bad) practice in this area, then let's
globally add "Serializable" to every class...
Is there a CheckStyle rule to detect such a requirement? Can anyone come up with a script
that would automatically do the job?

> 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