Removing Serializable for events detectors (and perhaps attitude providers)?

Hi all,

Several interfaces in Orekit extend Serializable. This has always been a controversial choice and we have progressively removed some of them (for example step handlers serialization has been removed about 6 years ago).

As event detectors become more and more complex and often reference external objects (like a PVCoordinatesProvider for the slave satellite in InterSatDirectViewDetector or a ToDoubleFunction for FunctionalDetector), they are often not serializable at all. Indeed, serializing an event detector is needed only (as far as I remember) because AttitudesSequence references arbitrary event detectors and also implements AttitudeProvider, which extends Serializable.

What about having event detectors not being serializable anymore?

We could do this by having AttitudesSequence explicitly throwing an exception when attempting to serialize it, or even more drastic, having AttitudeProvider not being serializable anymore too.

+1 for removing serialization. I don’t use Java’s serialization because I think it is fundamentally insecure.

Regards,
Evan

+1 for removing serialization too. In some cases it raised issues in plugin findBugs of Jenkins that are hard to get rid off.

Regards,
Maxime

+1 for removing serialization. I also think it is unsafe and error-prone.

Regards,
Pascal

+1 for removing serialization. Same as Evan, I don’t use Java serialization because I think this is a too obscure concept.

Regards,
Bryan

Serialization has been removed for event detectors, field of view, attitude provider and a few analytical providers (see https://gitlab.orekit.org/orekit/orekit/issues/530).