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


#1

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.


#2

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

Regards,
Evan


#3

+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


#4

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

Regards,
Pascal


#5

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

Regards,
Bryan


#6

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).