Since NXP-25186, logic has changed in MarshallerRegistryImpl.
Contribution has not registered/unregistered directly using register/unregister methods. They are saved in generic registry and then registered during startup.
This leads to an issue during hot reload because we try to register again marshallers and we don't unregister marshallers removed during hot reload.
We shouldn't re-create marshallers during start, or at least only ones that have changed and we should unregister marshallers removed during hot reload.
Symptom of issue is this kind of log:
2018-09-13 10:36:41,833 WARN [http-nio-0.0.0.0-8080-exec-9] [org.nuxeo.ecm.core.io.registry.MarshallerRegistryImpl] The marshaller org.nuxeo.ecm.platform.thumbnail.io.ThumbnailJsonEnricher is already registered.